(reader: &mut R)
| 74 | impl BorshDeserialize for CircuitTransaction { |
| 75 | #[inline] |
| 76 | fn deserialize_reader<R: borsh::io::Read>(reader: &mut R) -> borsh::io::Result<Self> { |
| 77 | let version = Version(i32::deserialize_reader(reader)?); |
| 78 | let lock_time = LockTime::from_consensus(u32::deserialize_reader(reader)?); |
| 79 | let input_len = usize::deserialize_reader(reader)?; |
| 80 | let mut input = Vec::with_capacity(input_len); |
| 81 | for _ in 0..input_len { |
| 82 | input.push(deserialize_txin(reader)?); |
| 83 | } |
| 84 | let output_len = usize::deserialize_reader(reader)?; |
| 85 | let mut output = Vec::with_capacity(output_len); |
| 86 | for _ in 0..output_len { |
| 87 | output.push(deserialize_txout(reader)?); |
| 88 | } |
| 89 | |
| 90 | let tx = Transaction { |
| 91 | version, |
| 92 | lock_time, |
| 93 | input, |
| 94 | output, |
| 95 | }; |
| 96 | |
| 97 | Ok(Self(tx)) |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | fn serialize_txin<W: borsh::io::Write>(txin: &TxIn, writer: &mut W) -> borsh::io::Result<()> { |
nothing calls this directly
no test coverage detected