mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
bitcoin: Compute block hash while parsing
This avoids having to re-serialize the block header just to compute the hash. It also frees us from having to carry around all the details in the header and we can hand around a minimal version.
This commit is contained in:
@@ -23,6 +23,7 @@ struct bitcoin_block_hdr {
|
||||
le32 timestamp;
|
||||
le32 target;
|
||||
le32 nonce;
|
||||
struct sha256_double hash;
|
||||
};
|
||||
|
||||
struct elements_block_proof {
|
||||
|
||||
Reference in New Issue
Block a user