)), } } fn get_raw_transaction( &self, txid: Txid, verbose: Option, blockhash: Option, ) -> Result { assert_eq!(blockhash, None, "Blockhash param is unsupported"); if verbose.unwrap_or(false) { match self.state().transactions.get(&txid) { Some(_) => Ok( serde_json::to_value(GetRawTransactionResult { in_active_chain: Some(true), hex: Vec::new(), txid: Txid::all_zeros(), hash: Wtxid::all_zeros(), size: 0, vsize: 0, version: 0, locktime: 0, vin: Vec::new(), vout: Vec::new(), blockhash: None, confirmations: Some(1), time: None, blocktime: None, }) .unwrap(), ), None => Err(Self::not_found()), } } else { match self.state().transactions.get(&txid) { Some(tx) => Ok(Value::String(hex::encode(serialize(tx)))),