mirror of https://github.com/poanetwork/quorum.git
Merge remote-tracking branch 'quorum/master' into geth-upgrade-1.8.12
# Conflicts: # core/tx_pool_test.go # miner/worker.go
This commit is contained in:
commit
66d46778e6
|
@ -565,7 +565,8 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
|
|||
return ErrInvalidGasPrice
|
||||
}
|
||||
// Heuristic limit, reject transactions over 32KB to prevent DOS attacks
|
||||
if tx.Size() > 32*1024 {
|
||||
// UPDATED to 64KB to support the deployment of bigger contract due to the pressing need for sophisticated/complex contract in financial/capital markets - Nathan Aw
|
||||
if tx.Size() > 64*1024 {
|
||||
return ErrOversizedData
|
||||
}
|
||||
// Transactions can't be negative. This may never happen using RLP decoded
|
||||
|
|
|
@ -278,8 +278,8 @@ func TestInvalidTransactions(t *testing.T) {
|
|||
t.Error("expected", ErrGasLimit, "; got", err)
|
||||
}
|
||||
|
||||
data := make([]byte, (32*1024)+1)
|
||||
tx2, _ := types.SignTx(types.NewTransaction(2, common.Address{}, big.NewInt(100),100000, big.NewInt(1), data), types.HomesteadSigner{}, key)
|
||||
data := make([]byte, (64*1024)+1)
|
||||
tx2, _ := types.SignTx(types.NewTransaction(2, common.Address{}, big.NewInt(100), big.NewInt(100000), big.NewInt(1), data), types.HomesteadSigner{}, key)
|
||||
if err := pool.AddRemote(tx2); err != ErrOversizedData {
|
||||
t.Error("expected", ErrOversizedData, "; got", err)
|
||||
}
|
||||
|
|
|
@ -344,6 +344,17 @@ func (self *worker) wait() {
|
|||
log.Error("Failed writWriteBlockAndStating block to chain", "err", err)
|
||||
continue
|
||||
}
|
||||
|
||||
if err := core.WritePrivateBlockBloom(self.chainDb, block.NumberU64(), work.privateReceipts); err != nil {
|
||||
log.Error("Failed writing private block bloom", "err", err)
|
||||
continue
|
||||
}
|
||||
|
||||
// check if canon block and write transactions
|
||||
if stat == core.CanonStatTy {
|
||||
// implicit by posting ChainHeadEvent
|
||||
mustCommitNewWork = false
|
||||
}
|
||||
// Broadcast the block and announce chain insertion event
|
||||
self.mux.Post(core.NewMinedBlockEvent{Block: block})
|
||||
var (
|
||||
|
|
|
@ -30,7 +30,6 @@ func isNodePermissioned(nodename string, currentNode string, datadir string, dir
|
|||
log.Debug("isNodePermissioned", "connection", direction, "nodename", nodename[:NODE_NAME_LENGTH], "ALLOWED-BY", currentNode[:NODE_NAME_LENGTH])
|
||||
return true
|
||||
}
|
||||
log.Debug("isNodePermissioned", "connection", direction, "nodename", nodename[:NODE_NAME_LENGTH], "DENIED-BY", currentNode[:NODE_NAME_LENGTH])
|
||||
}
|
||||
log.Debug("isNodePermissioned", "connection", direction, "nodename", nodename[:NODE_NAME_LENGTH], "DENIED-BY", currentNode[:NODE_NAME_LENGTH])
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue