|
|
@ -484,11 +484,11 @@ impl WalletTx { |
|
|
|
// Outgoing metadata was only added in version 2
|
|
|
|
let outgoing_metadata = Vector::read(&mut reader, |r| OutgoingTxMetadata::read(r))?; |
|
|
|
|
|
|
|
let incoming_metadata = Vector::read(&mut reader, |r| IncomingTxMetadata::read(r))?; |
|
|
|
//let incoming_metadata = Vector::read(&mut reader, |r| IncomingTxMetadata::read(r))?;
|
|
|
|
|
|
|
|
let full_tx_scanned = reader.read_u8()? > 0; |
|
|
|
|
|
|
|
Ok(WalletTx{ |
|
|
|
let mut wallet_tx = WalletTx { |
|
|
|
block, |
|
|
|
datetime, |
|
|
|
txid, |
|
|
@ -497,9 +497,15 @@ impl WalletTx { |
|
|
|
total_shielded_value_spent, |
|
|
|
total_transparent_value_spent, |
|
|
|
outgoing_metadata, |
|
|
|
incoming_metadata, |
|
|
|
incoming_metadata: vec![], |
|
|
|
full_tx_scanned |
|
|
|
}) |
|
|
|
}; |
|
|
|
if version >= 5 { |
|
|
|
wallet_tx.incoming_metadata = Vector::read(&mut reader, |r| IncomingTxMetadata::read(r))?; |
|
|
|
} |
|
|
|
|
|
|
|
Ok(wallet_tx) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
pub fn write<W: Write>(&self, mut writer: W) -> io::Result<()> { |
|
|
|