Merge pull request #675 from jbhurat/defaulting_tx_size_limit

Reading default transaction size limit, if it is 0
This commit is contained in:
Samer Falah 2019-04-04 14:43:32 -04:00 committed by GitHub
commit 697791f6fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -578,6 +578,9 @@ func (pool *TxPool) local() map[common.Address]types.Transactions {
func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
isQuorum := pool.chainconfig.IsQuorum
sizeLimit := pool.chainconfig.TransactionSizeLimit
if sizeLimit == 0 {
sizeLimit = DefaultTxPoolConfig.TransactionSizeLimit
}
if isQuorum && tx.GasPrice().Cmp(common.Big0) != 0 {
return ErrInvalidGasPrice