X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fchain%2Ftransaction.rs;h=73e08ea22f41f4d32ac5a7804617e0e7219d0e1d;hb=refs%2Fheads%2F2018-09-chanmon-ser-framework;hp=f89b6080600a46b32bcbc5afc4ff66cafdd39c42;hpb=4330ae5d4f1fefeb7f211360354fb04eb8480351;p=rust-lightning diff --git a/src/chain/transaction.rs b/src/chain/transaction.rs index f89b6080..73e08ea2 100644 --- a/src/chain/transaction.rs +++ b/src/chain/transaction.rs @@ -1,3 +1,5 @@ +//! Contains simple structs describing parts of transactions on the chain. + use bitcoin::util::hash::Sha256dHash; use bitcoin::blockdata::transaction::OutPoint as BitcoinOutPoint; @@ -13,7 +15,7 @@ pub struct OutPoint { } impl OutPoint { - /// Creates a new `OutPoint` from the txid an the index. + /// Creates a new `OutPoint` from the txid and the index. pub fn new(txid: Sha256dHash, index: u16) -> OutPoint { OutPoint { txid, index } } @@ -27,6 +29,7 @@ impl OutPoint { res } + /// Converts this OutPoint into the OutPoint field as used by rust-bitcoin pub fn into_bitcoin_outpoint(self) -> BitcoinOutPoint { BitcoinOutPoint { txid: self.txid,