nimbus-eth1/nimbus/p2p
Jordan Hrycaj 2d6bf34175
Re-adjust canonical head to parent of block to be inserted (#726)
* Re-adjust canonical head to parent of block to be inserted

why:
  of the failing tests that remain to be solved, 30 of those will succeed
  if the canonical database chain head is cleverly adjusted -- yes, it
  looks like a hack, indeed.

details:
  at the moment, this hack works for the non-hive tests only and is
  triggered by a boolean argument passed on to the chain.persistBlocks()
  method.

* Use parent instead of canonical head for block to be inserted

why:
  side chains need to be inserted typically somewhere before the
  canonical head.

details:
  the previous _hack_ was unnecessary and removed, it was inspired by
  some verification in persistBlocks() which explicitly referenced the
  canonical head (which now might or might not refer to the newly inserted
  header.)

* remove unnecessary code + comment
2021-06-22 17:52:31 +01:00
..
clique after rebase fix (#715) 2021-06-17 09:17:49 +01:00
validate use general lru_cache for EpochHashCache 2021-05-24 07:57:21 +01:00
chain.nim Re-adjust canonical head to parent of block to be inserted (#726) 2021-06-22 17:52:31 +01:00
clique.nim all snapshot unit tests succeed 2021-06-17 08:03:57 +01:00
dao.nim replace state_db with accounts_cache 2020-05-30 10:14:59 +07:00
executor.nim Transaction: Use same log level for all block rejection causes 2021-06-08 18:07:50 +01:00
validate.nim verify age of uncle's parent (#719) 2021-06-18 08:37:59 +01:00