-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block: Add test that double-spending blocks are rejected
Includes a rewrite of helper function for constructing a new block that makes it easier to create a new block from a BlockPrimitiveWitness. Specifically, a new function `block_template_from_primitive_witness` is added which is used in this test as well as in the call graph for creating a new block from a transaction and a predecessor. Also adds an "unsafe" version of MutatorSetUpdate's "apply" function that allows the caller to calculate a new MS accumulator which ignores double spends. This was needed to allow the BlockPrimitiveWitness constructor to complete the construction of a block with a double- spending transaction.
- Loading branch information
1 parent
f751c0e
commit 9e658cf
Showing
4 changed files
with
161 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters