|
|
|
@ -8,11 +8,13 @@ import ( |
|
|
|
|
"math" |
|
|
|
|
"os" |
|
|
|
|
"os/exec" |
|
|
|
|
"sync/atomic" |
|
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
"github.com/harmony-one/harmony/core" |
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
|
"github.com/ethereum/go-ethereum/rlp" |
|
|
|
|
pb "github.com/golang/protobuf/proto" |
|
|
|
|
"github.com/harmony-one/bls/ffi/go/bls" |
|
|
|
@ -311,6 +313,17 @@ func (node *Node) PostConsensusProcessing(newBlock *types.Block) { |
|
|
|
|
node.AddNewBlock(newBlock) |
|
|
|
|
|
|
|
|
|
if node.Consensus.ShardID == 0 { |
|
|
|
|
// Update contract deployer's nonce so default contract like faucet can issue transaction with current nonce
|
|
|
|
|
nonce := node.GetNonceOfAddress(crypto.PubkeyToAddress(node.ContractDeployerKey.PublicKey)) |
|
|
|
|
atomic.StoreUint64(&node.ContractDeployerCurrentNonce, nonce) |
|
|
|
|
|
|
|
|
|
// TODO: enable drand only for beacon chain
|
|
|
|
|
// ConfirmedBlockChannel which is listened by drand leader who will initiate DRG if its a epoch block (first block of a epoch)
|
|
|
|
|
if node.DRand != nil { |
|
|
|
|
go func() { |
|
|
|
|
node.ConfirmedBlockChannel <- newBlock |
|
|
|
|
}() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ConfirmedBlockChannel which is listened by drand leader who will initiate DRG if its a epoch block (first block of a epoch)
|
|
|
|
|
if node.DRand != nil { |
|
|
|
|