File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,21 @@ pub struct PartialMerkleTree {
122
122
}
123
123
124
124
impl PartialMerkleTree {
125
+ /// Returns the total number of transactions in the block.
126
+ pub fn num_transactions ( & self ) -> u32 {
127
+ self . num_transactions
128
+ }
129
+
130
+ /// Returns the node-is-parent-of-matched-txid bits of the partial merkle tree.
131
+ pub fn bits ( & self ) -> & Vec < bool > {
132
+ & self . bits
133
+ }
134
+
135
+ /// Returns the transaction ids and internal hashes of the partial merkle tree.
136
+ pub fn hashes ( & self ) -> & Vec < TxMerkleNode > {
137
+ & self . hashes
138
+ }
139
+
125
140
/// Construct a partial merkle tree
126
141
/// The `txids` are the transaction hashes of the block and the `matches` is the contains flags
127
142
/// wherever a tx hash should be included in the proof.
You can’t perform that action at this time.
0 commit comments