MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_from_transaction

Function test_from_transaction

final-spv/src/transaction.rs:192–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190
191 #[test]
192 fn test_from_transaction() {
193 let original_tx = Transaction {
194 version: Version(1),
195 lock_time: LockTime::from_consensus(0),
196 input: vec![],
197 output: vec![],
198 };
199
200 let bridge_tx = CircuitTransaction::from(original_tx.clone());
201 assert_eq!(bridge_tx.inner(), &original_tx);
202
203 let bridge_tx2: CircuitTransaction = original_tx.clone().into();
204 assert_eq!(bridge_tx2.inner(), &original_tx);
205 assert_eq!(bridge_tx.txid(), bridge_tx2.txid());
206 assert_eq!(bridge_tx.txid(), bridge_tx2.txid());
207 }
208
209 #[test]
210 fn test_into_transaction() {

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.80
intoMethod · 0.45

Tested by

no test coverage detected