decrease default BLOCK_GAS_LIMIT

This commit is contained in:
Alexey 2020-12-23 20:03:20 -06:00
parent ab82b37e0d
commit 2b38927743
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class Transaction {
async _prepare() {
if (!this.config.BLOCK_GAS_LIMIT) {
const lastBlock = await this._provider.getBlock('latest')
this.config.BLOCK_GAS_LIMIT = lastBlock.gasLimit.toNumber()
this.config.BLOCK_GAS_LIMIT = Math.floor(lastBlock.gasLimit.toNumber() * 0.95)
}
if (!this.tx.gasLimit || this.config.ESTIMATE_GAS) {