bsc/core
meowsbits c72b16c340
core: use block difficulty for genesis (#23793)
* core: write test showing that TD is not stored properly at genesis

The ToBlock method applies a default value for an empty
difficulty value. This default is not carried over through the Commit
method because the TotalDifficulty database write writes the
original difficulty value (nil) instead of the defaulty value
present on the genesis Block.

Date: 2021-10-22 08:25:32-07:00
Signed-off-by: meows <b5c6@protonmail.com>

* core: write TD value from Block, not original genesis value

This an issue where a default TD value was not written to
the database, resulting in a 0 value TD at genesis.

A test for this issue was provided at 90e3ffd393

Date: 2021-10-22 08:28:00-07:00
Signed-off-by: meows <b5c6@protonmail.com>

* core: fix tests by adding GenesisDifficulty to expected result

See prior two commits.

Date: 2021-10-22 09:16:01-07:00
Signed-off-by: meows <b5c6@protonmail.com>

* les: fix test with genesis change

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-10-26 08:44:43 +02:00
..
asm core/asm: fix the bug of "00" prefix number (#22883) 2021-05-18 10:22:58 +02:00
bloombits all: fix some go-critic linter warnings (#23709) 2021-10-13 17:31:02 +02:00
forkid core, params: define london block at 12965000 (#23176) 2021-07-08 12:34:56 +03:00
rawdb core/rawdb, ethdb: introduce batched/atomic reads from ancients (#23566) 2021-10-25 16:24:27 +02:00
state core/state/snapshot: fix BAD BLOCK error when snapshot is generating (#23635) 2021-10-20 10:05:27 +02:00
types core/types: add MarshalBinary, UnmarshalBinary for Receipt (#22806) 2021-10-13 15:16:16 +02:00
vm core,eth: call frame tracing (#23087) 2021-09-17 09:31:22 +02:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go EIP-1559: miner changes (#22896) 2021-05-21 09:59:26 +02:00
block_validator_test.go cmd, core, eth, miner: deprecate miner.gastarget flag (#23213) 2021-08-10 11:28:33 +03:00
block_validator.go cmd, core, eth, miner: deprecate miner.gastarget flag (#23213) 2021-08-10 11:28:33 +03:00
blockchain_insert.go core: fix blockchain insert report time interval calculation (#21723) 2020-10-21 16:53:30 +02:00
blockchain_reader.go core: refactored blockchain.go (#23735) 2021-10-18 10:45:59 +03:00
blockchain_repair_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
blockchain_sethead_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
blockchain_snapshot_test.go core: fix typo in comment (#23658) 2021-09-29 21:28:47 +02:00
blockchain_test.go core: use block difficulty for genesis (#23793) 2021-10-26 08:44:43 +02:00
blockchain.go core: refactored blockchain.go (#23735) 2021-10-18 10:45:59 +03:00
blocks.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
bloom_indexer.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
chain_indexer_test.go core: fix potential race in chainIndexerTest (#22346) 2021-03-19 13:32:57 +01:00
chain_indexer.go all: make logs a bit easier on the eye to digest (#22665) 2021-04-15 20:35:00 +03:00
chain_makers_test.go cmd, core, eth: background transaction indexing (#20302) 2020-05-11 18:58:43 +03:00
chain_makers.go cmd, core, eth, miner: deprecate miner.gastarget flag (#23213) 2021-08-10 11:28:33 +03:00
dao_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
error.go core/rawdb: freezer batch write (#23462) 2021-09-07 12:31:17 +02:00
events.go eth/filters: remove use of event.TypeMux for pending logs (#20312) 2019-12-10 12:39:14 +01:00
evm.go all: implement EIP-1559 (#22837) 2021-05-17 15:13:22 +02:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis_account.go tests: update for London (#22976) 2021-06-07 14:37:56 +02:00
gen_genesis.go core: change baseFee into baseFeePerGas in genesis json 2021-06-14 14:04:44 +02:00
genesis_alloc.go cmd/geth, core, params: replace baikal with calaveras (#22972) 2021-05-31 10:06:48 +03:00
genesis_test.go core: use block difficulty for genesis (#23793) 2021-10-26 08:44:43 +02:00
genesis.go core: use block difficulty for genesis (#23793) 2021-10-26 08:44:43 +02:00
headerchain_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
headerchain.go consensus/clique, core: API cleanup (#23100) 2021-10-11 23:16:46 +02:00
mkalloc.go all: add go:build lines (#23468) 2021-08-25 18:46:29 +02:00
rlp_test.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2021-06-15 13:56:14 +03:00
state_prefetcher.go all: removed blockhash from statedb (#23126) 2021-06-30 15:17:01 +02:00
state_processor_test.go core: check if sender is EOA (#23303) 2021-08-07 19:38:18 +02:00
state_processor.go all: removed blockhash from statedb (#23126) 2021-06-30 15:17:01 +02:00
state_transition.go core: only check sendernoeoa in non fake mode (#23424) 2021-08-23 12:49:39 +03:00
tx_cacher.go Comment error (#18303) 2018-12-14 11:15:31 +01:00
tx_journal.go core: transaction journal should not be executable (#23090) 2021-06-23 07:29:20 +03:00
tx_list_test.go Revert "core, txpool: less allocations when handling transactions (#21232)" 2020-07-09 14:02:03 +02:00
tx_list.go core: make txPricedList.stales the first field for 64bit alignment (#23542) 2021-09-07 17:15:11 +03:00
tx_noncer.go core: fix write concurrency in txpool (#19835) 2019-07-17 13:39:41 +03:00
tx_pool_test.go core: remove unused error from TxPool.Pending (#23720) 2021-10-13 23:00:45 +02:00
tx_pool.go core: remove unused error from TxPool.Pending (#23720) 2021-10-13 23:00:45 +02:00
types.go core: prefetch next block state concurrently 2019-04-01 11:06:15 +03:00