@@ -258,11 +258,10 @@ impl From<OutputId> for OutPoint {
258258}
259259
260260/// Binary tree map of nullifiers from transaction spends or actions
261- #[ derive( Debug , Getters , MutGetters ) ]
262- #[ getset( get = "pub" , get_mut = "pub" ) ]
261+ #[ derive( Debug ) ]
263262pub struct NullifierMap {
264- sapling : BTreeMap < sapling_crypto:: Nullifier , Locator > ,
265- orchard : BTreeMap < orchard:: note:: Nullifier , Locator > ,
263+ pub ( crate ) sapling : BTreeMap < sapling_crypto:: Nullifier , Locator > ,
264+ pub ( crate ) orchard : BTreeMap < orchard:: note:: Nullifier , Locator > ,
266265}
267266
268267impl NullifierMap {
@@ -272,6 +271,11 @@ impl NullifierMap {
272271 orchard : BTreeMap :: new ( ) ,
273272 }
274273 }
274+
275+ pub fn clear ( & mut self ) {
276+ self . sapling . clear ( ) ;
277+ self . orchard . clear ( ) ;
278+ }
275279}
276280
277281impl Default for NullifierMap {
@@ -281,14 +285,12 @@ impl Default for NullifierMap {
281285}
282286
283287/// Wallet block data
284- #[ derive( Debug , Clone , CopyGetters ) ]
285- #[ getset( get_copy = "pub" ) ]
288+ #[ derive( Debug , Clone ) ]
286289pub struct WalletBlock {
287290 block_height : BlockHeight ,
288291 block_hash : BlockHash ,
289292 prev_hash : BlockHash ,
290293 time : u32 ,
291- #[ getset( skip) ]
292294 txids : Vec < TxId > ,
293295 tree_boundaries : TreeBoundaries ,
294296 // TODO: optional price
@@ -313,9 +315,29 @@ impl WalletBlock {
313315 }
314316 }
315317
318+ pub fn block_height ( & self ) -> BlockHeight {
319+ self . block_height
320+ }
321+
322+ pub fn block_hash ( & self ) -> BlockHash {
323+ self . block_hash
324+ }
325+
326+ pub fn prev_hash ( & self ) -> BlockHash {
327+ self . prev_hash
328+ }
329+
330+ pub fn time ( & self ) -> u32 {
331+ self . time
332+ }
333+
316334 pub fn txids ( & self ) -> & [ TxId ] {
317335 & self . txids
318336 }
337+
338+ pub fn tree_boundaries ( & self ) -> TreeBoundaries {
339+ self . tree_boundaries
340+ }
319341}
320342
321343/// Wallet transaction
0 commit comments