* Cleanup

* Cleanup
fix/dev-go-mod
Konstantin 1 year ago committed by GitHub
parent f24413e683
commit e124173a81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Makefile
  2. 2
      core/blockchain_impl.go
  3. 10
      core/state_processor.go

@ -180,6 +180,3 @@ debug_external: clean
build_localnet_validator:
bash test/build-localnet-validator.sh
tt:
go test -v -test.run OnDisconnectCheck ./p2p/security

@ -1682,8 +1682,6 @@ func (bc *BlockChainImpl) insertChain(chain types.Blocks, verifyHeaders bool) (i
if len(chain) == 0 {
return 0, nil, nil, ErrEmptyChain
}
first := chain[0]
fmt.Println("insertChain", utils.GetPort(), first.ShardID(), first.Epoch().Uint64(), first.NumberU64())
// Do a sanity check that the provided chain is actually ordered and linked
for i := 1; i < len(chain); i++ {
if chain[i].NumberU64() != chain[i-1].NumberU64()+1 || chain[i].ParentHash() != chain[i-1].Hash() {

@ -310,7 +310,15 @@ func ApplyTransaction(bc ChainContext, author *common.Address, gp *GasPool, stat
// Apply the transaction to the current state (included in the env)
result, err := ApplyMessage(vmenv, msg, gp)
if err != nil {
return nil, nil, nil, 0, errors.Wrapf(err, "apply failed from='%s' to='%s' balance='%s'", msg.From().Hex(), msg.To().Hex(), statedb.GetBalance(msg.From()).String())
to := ""
if m := msg.To(); m != nil {
to = m.Hex()
}
balance := ""
if a := statedb.GetBalance(msg.From()); a != nil {
balance = a.String()
}
return nil, nil, nil, 0, errors.Wrapf(err, "apply failed from='%s' to='%s' balance='%s'", msg.From().Hex(), to, balance)
}
// Update the state with pending changes
var root []byte

Loading…
Cancel
Save