mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge pull request #45 from dinhln89/master
Hot fixed for bug can't deploy smart contract to master node.
This commit is contained in:
commit
6a3b1a808e
2 changed files with 2 additions and 2 deletions
|
|
@ -586,7 +586,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
|
||||||
if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 {
|
if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 {
|
||||||
return ErrInsufficientFunds
|
return ErrInsufficientFunds
|
||||||
}
|
}
|
||||||
if tx.To().String() != common.BlockSigners {
|
if tx.To() != nil && tx.To().String() != common.BlockSigners {
|
||||||
intrGas, err := IntrinsicGas(tx.Data(), tx.To() == nil, pool.homestead)
|
intrGas, err := IntrinsicGas(tx.Data(), tx.To() == nil, pool.homestead)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
if number > 0 && prevCheckpoint > 0 {
|
if number > 0 && prevCheckpoint > 0 {
|
||||||
// Not reward for singer of genesis block and only calculate reward at checkpoint block.
|
// Not reward for singer of genesis block and only calculate reward at checkpoint block.
|
||||||
startBlockNumber := number - (rCheckpoint * 2) + 1
|
startBlockNumber := number - (rCheckpoint * 2) + 1
|
||||||
endBlockNumber := startBlockNumber + rCheckpoint - 2
|
endBlockNumber := startBlockNumber + rCheckpoint - 1
|
||||||
signers := make(map[common.Address]*rewardLog)
|
signers := make(map[common.Address]*rewardLog)
|
||||||
validators := make(map[common.Address]*rewardLog)
|
validators := make(map[common.Address]*rewardLog)
|
||||||
totalSigner := uint64(0)
|
totalSigner := uint64(0)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue