This commit is contained in:
Luke Parker
2023-10-23 05:07:38 -04:00
parent fbf51e53ec
commit 0d23964762
5 changed files with 114 additions and 26 deletions

View File

@@ -163,6 +163,11 @@ impl TransactionTrait<Bitcoin> for Transaction {
self.consensus_encode(&mut buf).unwrap();
buf
}
fn read<R: io::Read>(reader: &mut R) -> io::Result<Self> {
Transaction::consensus_decode(reader)
.map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{e}")))
}
#[cfg(test)]
async fn fee(&self, network: &Bitcoin) -> u64 {
let mut value = 0;