We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e53ec31 commit de82b59Copy full SHA for de82b59
src/block.rs
@@ -234,6 +234,20 @@ impl BlockHeader {
234
false
235
}
236
237
+
238
+ /// Remove the witness data of the block header.
239
+ /// This is all the data that can be removed without changing
240
+ /// the block hash.
241
+ pub fn clear_witness(&mut self) {
242
+ match &mut self.ext {
243
+ &mut ExtData::Proof { ref mut solution, .. } => {
244
+ *solution = Script::new();
245
+ },
246
+ &mut ExtData::Dynafed { ref mut signblock_witness, .. } => {
247
+ signblock_witness.clear();
248
249
+ }
250
251
252
253
impl Encodable for BlockHeader {
0 commit comments