From b0d2032c680bbc9914acf21f42ae79499b6c9a44 Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Mon, 17 Apr 2023 18:50:21 +0200 Subject: [PATCH] fix: wallet ffi header file (#5329) Description --- Fixes the header file by removing the auto-generated repc command as c does not have an option. How Has This Been Tested? --- manual --- .../wallet_ffi/src/ffi_basenode_state.rs | 1 - base_layer/wallet_ffi/wallet.h | 43 +------------------ 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/base_layer/wallet_ffi/src/ffi_basenode_state.rs b/base_layer/wallet_ffi/src/ffi_basenode_state.rs index eb0956b685..7c7d06e45b 100644 --- a/base_layer/wallet_ffi/src/ffi_basenode_state.rs +++ b/base_layer/wallet_ffi/src/ffi_basenode_state.rs @@ -36,7 +36,6 @@ use crate::{ }; #[derive(Debug)] -#[repr(C)] pub struct TariBaseNodeState { /// The ID of the base node this wallet is connected to pub node_id: Option, diff --git a/base_layer/wallet_ffi/wallet.h b/base_layer/wallet_ffi/wallet.h index 0307916370..b3b25dc157 100644 --- a/base_layer/wallet_ffi/wallet.h +++ b/base_layer/wallet_ffi/wallet.h @@ -85,12 +85,8 @@ struct FeePerGramStat; struct FeePerGramStatsResponse; -struct FixedHash; - struct InboundTransaction; -struct Option_NodeId; - struct OutboundTransaction; /** @@ -159,6 +155,8 @@ struct RistrettoSecretKey; struct TariAddress; +struct TariBaseNodeState; + struct TariCompletedTransactions; struct TariContacts; @@ -324,43 +322,6 @@ typedef struct P2pConfig TariCommsConfig; typedef struct Balance TariBalance; -typedef struct FixedHash BlockHash; - -struct TariBaseNodeState { - /** - * The ID of the base node this wallet is connected to - */ - struct Option_NodeId node_id; - /** - * The current chain height, or the block number of the longest valid chain, or zero if there is no chain - */ - uint64_t height_of_longest_chain; - /** - * The block hash of the current tip of the longest valid chain - */ - BlockHash best_block; - /** - * Timestamp of the tip block in the longest valid chain - */ - uint64_t best_block_timestamp; - /** - * The configured number of blocks back from the tip that this database tracks. A value of 0 indicates that - * pruning mode is disabled and the node will keep full blocks from the time it was set. If pruning horizon - * was previously enabled, previously pruned blocks will remain pruned. If set from initial sync, full blocks - * are preserved from genesis (i.e. the database is in full archival mode). - */ - uint64_t pruning_horizon; - /** - * The height of the pruning horizon. This indicates from what height a full block can be provided - * (exclusive). If `pruned_height` is equal to the `height_of_longest_chain` no blocks can be - * provided. Archival nodes wil always have an `pruned_height` of zero. - */ - uint64_t pruned_height; - bool is_node_synced; - uint64_t updated_at; - uint64_t latency; -}; - typedef struct FeePerGramStatsResponse TariFeePerGramStats; typedef struct FeePerGramStat TariFeePerGramStat;