Skip to content

Commit a8e44d1

Browse files
committed
chore: cleanup, remove ferment
1 parent 0a138d7 commit a8e44d1

20 files changed

+81
-59
lines changed

Cargo.lock

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash-spv-coinjoin/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ test-helpers = []
1313

1414
[dependencies]
1515
dash-spv-masternode-processor = { path = "../dash-spv-masternode-processor" }
16-
ferment-interfaces = { path = "../../ferment/ferment-interfaces" }
17-
ferment-macro = { path = "../../ferment/ferment-macro" }
1816
logging = { path = "../logging" }
1917
byte = "0.2"
2018
tracing = "0.1.40"
2119

2220
[build-dependencies]
2321
cbindgen = "0.24.3"
24-
ferment = { path = "../../ferment/ferment" }
2522

2623
[lib]
2724
name = "dash_spv_coinjoin"

dash-spv-coinjoin/build.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
extern crate cbindgen;
2-
extern crate ferment;
32

4-
use std::process::Command;
3+
use std::env;
54

65
fn main() {
7-
match ferment::Builder::new()
8-
.with_crates(vec![])
9-
.generate() {
10-
Ok(()) => match Command::new("cbindgen")
11-
.args(&["--config", "cbindgen.toml", "-o", "target/example.h"])
12-
.status() {
13-
Ok(status) => println!("Bindings generated into target/example.h with status: {status}"),
14-
Err(err) => panic!("Can't generate bindings: {}", err)
15-
}
16-
Err(err) => panic!("Can't create FFI expansion: {}", err)
17-
}
6+
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
7+
let mut config = cbindgen::Config::from_file("./cbindgen.toml").expect("Error config");
8+
let includes = vec![];
9+
config.language = cbindgen::Language::C;
10+
config.parse = cbindgen::ParseConfig {
11+
parse_deps: true,
12+
include: Some(includes.clone()),
13+
extra_bindings: includes,
14+
..Default::default()
15+
};
16+
cbindgen::generate_with_config(&crate_dir, config)
17+
.unwrap()
18+
.write_to_file("target/dash_spv_coinjoin.h");
1819
}

dash-spv-coinjoin/src/coinjoin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use dash_spv_masternode_processor::chain::common::ChainType;
44
use dash_spv_masternode_processor::chain::params::DUFFS;
55
use dash_spv_masternode_processor::common::Block;
66
use dash_spv_masternode_processor::crypto::byte_util::UInt256;
7+
use dash_spv_masternode_processor::ffi::boxer::boxed;
78
use dash_spv_masternode_processor::ffi::unboxer::unbox_any;
89
use dash_spv_masternode_processor::tx::transaction::Transaction;
910
use dash_spv_masternode_processor::util::script::ScriptType;
10-
use ferment_interfaces::boxed;
1111
use logging::*;
1212
use tracing::{info, warn, debug};
1313
use crate::ffi::callbacks::{GetInputValueByPrevoutHash, HasChainLock, DestroyInputValue};
@@ -19,7 +19,6 @@ use crate::constants::COINJOIN_ENTRY_MAX_SIZE;
1919
use crate::utils::coin_format::CoinFormat;
2020

2121
#[derive(Debug)]
22-
// #[ferment_macro::export]
2322
pub struct CoinJoin {
2423
pub opaque_context: *const std::ffi::c_void,
2524
pub get_input_value_by_prevout_hash: GetInputValueByPrevoutHash,

dash-spv-coinjoin/src/coinjoin_client_queue_manager.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::collections::HashMap;
2-
use dash_spv_masternode_processor::{common::SocketAddress, crypto::UInt256, ffi::{from::FromFFI, unboxer::unbox_any}, models::MasternodeEntry};
3-
use ferment_interfaces::boxed;
2+
use dash_spv_masternode_processor::{common::SocketAddress, crypto::UInt256, ffi::{boxer::boxed, from::FromFFI, unboxer::unbox_any}, models::MasternodeEntry};
43
use std::time::{SystemTime, UNIX_EPOCH};
54
use tracing::{debug, info, warn};
65
use logging::*;

dash-spv-coinjoin/src/fermented.rs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dash-spv-coinjoin/src/ffi/input_value.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[repr(C)]
22
#[derive(Clone, Debug)]
3-
#[ferment_macro::export]
43
pub struct InputValue {
54
pub is_valid: bool,
65
pub value: u64,

dash-spv-coinjoin/src/messages/coinjoin_accept_message.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use crate::messages::coinjoin_message::CoinJoinMessageType;
77
// dsa
88
#[repr(C)]
99
#[derive(Clone, Debug)]
10-
#[ferment_macro::export]
1110
pub struct CoinJoinAcceptMessage {
1211
pub denomination: u32,
1312
pub tx_collateral: Transaction,

dash-spv-coinjoin/src/messages/coinjoin_broadcast_tx.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use crate::messages::coinjoin_message::CoinJoinMessageType;
1414
// dstx
1515
// #[repr(C)]
1616
#[derive(Clone, Debug)]
17-
// #[ferment_macro::export]
1817
pub struct CoinJoinBroadcastTx {
1918
pub tx: Transaction,
2019
pub pro_tx_hash: UInt256,

dash-spv-coinjoin/src/messages/coinjoin_complete_message.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::messages::coinjoin_message::CoinJoinMessageType;
66
// dsc
77
#[repr(C)]
88
#[derive(Clone, Debug)]
9-
#[ferment_macro::export]
109
pub struct CoinJoinCompleteMessage {
1110
pub msg_session_id: i32,
1211
pub msg_message_id: PoolMessage,

0 commit comments

Comments
 (0)