BDVUH72KI25HLSAA6SVUYGFT6QTM3ZEVFI3JMOED5Y5LG4OJSCNQC
WTQRUTW5K7IQ6V65XFTYTH4LBJA23GRZKJGWD4X265TWB5Q4XTPAC
O7Q6BARE5TBHLUUYBTIVTOE373NLQUOQTPYGQKQWNDNUA4ZLMCNAC
2SQFSBLL73SZQFVNRGAJJ6DWJC7PH423NCT3LNDP5BCNFGFQK4CQC
36H3LIVEN7MC5BEQ3VFCNSXCMT7TBDOVEZXRJJKMQDFDBY53STGAC
WLOVZ5OJEFQG57LMUNNIFHX6E7J5OZ6L2HEKY3N7KNNSLWMP2I4AC
HAVWPOXJXKLKF6P4ATMK52LEVARG4UURFFGCFN5EA4ZMF4JZGARAC
LAST6KDHOOQQBH2PVJUIXXGELKD7YUU4R7OV2JSUMK7TIMABJUUQC
WW3R2OTSI3NJJP2HXQ7QHBGYOO3NVS2NM3OQBDTLX5JQ3Z2DO7NAC
SGRGGOQHQZHXBJ2W6YQIHFGSX3L2LW43T6GEYLF3KFMKKQ3EISQQC
2ZVBF5CFNCLOMSEINEDT45GB3QTNLGFNVTXZIA4FRYSCVPUD5QIQC
XWWGLD7EDPEQVJL57RRGPKYHEQCJIJAPGMKI3S62QZOLR6ODKQRAC
let transaction = data.transaction.ok_or(Status::invalid_argument("transaction not specified"))?;
let data = transaction.data.ok_or(io::Error::new(io::ErrorKind::NotFound, "No transaction data found."))?;
let tid = data.tid;
let mut transaction = data.transaction.ok_or_else(|| Status::invalid_argument("transaction not specified"))?;
let tid = transaction.tid;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn serialize_test() {
let mut trans = Transaction::default();
trans.tid = 1;
trans.parent = 2;
trans.ts = 20;
let mut purchase = Purchase::default();
purchase.ts = Some(Timestamp { year: 2022, month: 12, day: 1, hour: 10, minute: 2, second: 3, tz: 3600 });
trans.transaction_type = Some(transaction::TransactionType::Purchase(purchase));
trans.signature = Some("test".to_string());
let sig = trans.signature;
trans.signature = None;
let mut buf = vec![];
let res = trans.encode(&mut buf);
println!("DEBUG: {:?} {:?} {:?} {:?}", trans, sig, buf, res);
}
}