Skip to content

Blockchain: potential _headHeaderHash inconsistencies / bugs #1072

Open
@holgerd77

Description

@holgerd77

This issue is NOT related to the latest stuff I wrote in the chat but some separate finding, I'll extract this as an issue since I wouldn't want to merge into #1068 and I would like to have some clear place for confirmation and discussion here before changing anything.

So the thing is that I have the impression that it is forgotten a couple of times to update the _headHeaderHash value along some update of the _headBlockHash value.

My current assumption here is that _headHeaderHash should always be updated if _headBlockHash is updated, let me know if this is for some reason is not the case and I understand something wrong here.

So following occurrences:

  • At the end of _putBlockOrHeader here, missing
  • In the else part of _putBlockOrHeader section from above as well here, missing _headHeaderHash update
  • In _deleteCanonicalChainReferences here, missing _headHeaderHash update
  • At the end of _rebuildCanonical()here, missing _headHeaderHash update
  • I then wonder if the comment from here on the header fields should also be expanded to _headBlockHash

//cc @jochem-brouwer

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions