Commit graph

12 commits

Author SHA1 Message Date
Byron Hambly
5c10c048e6
Merge 7ed2768dca into merged_master (Elements PR #1421) 2025-02-28 15:02:20 +02:00
Pablo Greco
38065e1159 Fix warning about mixing enum and int 2025-02-23 14:34:19 -08:00
James Dorfman
1ab6187071 Bug fix: when CheckChallenge(...) is called on a trimmed header, temporarily
untrim it in order to extract the proof.

Without this fix, there would be an exception in this scenario, because a trimmed
header no longer has any proof information attached to it.

This scenario was occuring when a pre-dynafed node with trimmed blocks would receive
a new block header from its peer. The pre-dynafed node would try to validate the header
by comparing its proof to the previous block's proof, and this would cause an exception
if the previous block had pruned.

New headers are not pruned as soon as they're received. Rather, they are pruned whenever the block index
is flushed to disk. So, this behavior was only being observed in functional tests, when a pre-dynafed trimmed
node was restarted.
2024-10-08 04:50:58 +00:00
Glenn Willen
68eb0864cb Refactor CBlockIndex to make proof and dynafed fields optional. 2022-12-12 09:46:04 -08:00
Andrew Poelstra
ba8273ac94 lint: fix non-pylint linter errors
Includes fixing all the spelling mistakes that are our fault,
but not those present upstream in Core.
2021-10-15 00:20:20 +00:00
Gregory Sanders
809f4acd3b Dynafed blocks must have sighash byte
It is not included in the signature hash.
The sighash byte MUST be SIGHASH_ALL to avoid
malleability.
2019-09-27 14:43:50 -04:00
Gregory Sanders
dddc040aa0 s/m_dyna_params/m_dynafed_params/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
642260a126 s/m_sbs_wit_limit/m_signblock_witness_limit/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
0fd39edf54 s/d_params/dynafed_params/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
4aa5f991f4 Refactor block_proof to support dynafed 2019-09-03 10:50:16 -04:00
Steven Roose
d8885400fb Add support for signed-blocks parent chains 2019-01-02 18:46:02 +01:00
Gregory Sanders
cd4e553914 CProof (re)setting and validation helper functions 2018-12-19 11:13:50 -05:00