Browse Source

Remove witness site from JSON

master
Aditya Kulkarni 4 years ago
parent
commit
25108df815
  1. 1
      lib/src/lightclient.rs
  2. 2
      lib/src/lightwallet/data.rs

1
lib/src/lightclient.rs

@ -836,7 +836,6 @@ impl LightClient {
"address" => LightWallet::note_address(self.config.hrp_sapling_address(), nd), "address" => LightWallet::note_address(self.config.hrp_sapling_address(), nd),
"spent" => nd.spent.map(|spent_txid| format!("{}", spent_txid)), "spent" => nd.spent.map(|spent_txid| format!("{}", spent_txid)),
"spent_at_height" => nd.spent_at_height.map(|h| format!("{}", h)), "spent_at_height" => nd.spent_at_height.map(|h| format!("{}", h)),
"witness_size" => nd.witnesses.len(),
"unconfirmed_spent" => nd.unconfirmed_spent.map(|spent_txid| format!("{}", spent_txid)), "unconfirmed_spent" => nd.unconfirmed_spent.map(|spent_txid| format!("{}", spent_txid)),
}) })
} }

2
lib/src/lightwallet/data.rs

@ -65,7 +65,7 @@ pub struct SaplingNoteData {
pub(super) extfvk: ExtendedFullViewingKey, // Technically, this should be recoverable from the account number, but we're going to refactor this in the future, so I'll write it again here. pub(super) extfvk: ExtendedFullViewingKey, // Technically, this should be recoverable from the account number, but we're going to refactor this in the future, so I'll write it again here.
pub diversifier: Diversifier, pub diversifier: Diversifier,
pub note: Note<Bls12>, pub note: Note<Bls12>,
pub witnesses: Vec<IncrementalWitness<Node>>, pub(super) witnesses: Vec<IncrementalWitness<Node>>,
pub(super) nullifier: [u8; 32], pub(super) nullifier: [u8; 32],
pub spent: Option<TxId>, // If this note was confirmed spent pub spent: Option<TxId>, // If this note was confirmed spent
pub spent_at_height: Option<i32>, // The height at which this note was spent pub spent_at_height: Option<i32>, // The height at which this note was spent

Loading…
Cancel
Save