mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
cherry-picked simulation scripts
This commit is contained in:
parent
68b124382a
commit
486d8bbb81
6 changed files with 3 additions and 1 deletions
|
|
@ -447,6 +447,9 @@ func WriteTd(db ethdb.Putter, hash common.Hash, number uint64, td *big.Int) erro
|
||||||
|
|
||||||
// WriteBlock serializes a block into the database, header and body separately.
|
// WriteBlock serializes a block into the database, header and body separately.
|
||||||
func WriteBlock(db ethdb.Putter, block *types.Block) error {
|
func WriteBlock(db ethdb.Putter, block *types.Block) error {
|
||||||
|
fmt.Println("+++++++++++++++++++++++++++")
|
||||||
|
fmt.Println(block.Transactions())
|
||||||
|
fmt.Println("+++++++++++++++++++++++++++")
|
||||||
// Store the body first to retain database consistency
|
// Store the body first to retain database consistency
|
||||||
if err := WriteBody(db, block.Hash(), block.NumberU64(), block.Body()); err != nil {
|
if err := WriteBody(db, block.Hash(), block.NumberU64(), block.Body()); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,5 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func WriteBlock(db ethdb.Putter, block *types.Block) error {
|
func WriteBlock(db ethdb.Putter, block *types.Block) error {
|
||||||
fmt.Println(block)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue