diff --git a/packages/hardhat-core/src/internal/hardhat-network/provider/output.ts b/packages/hardhat-core/src/internal/hardhat-network/provider/output.ts index bbce40eba0..caad380fb8 100644 --- a/packages/hardhat-core/src/internal/hardhat-network/provider/output.ts +++ b/packages/hardhat-core/src/internal/hardhat-network/provider/output.ts @@ -170,7 +170,7 @@ export function getRpcBlock( nonce: pending ? null : bufferToRpcData(block.header.nonce, 8), mixHash: pending ? null : bufferToRpcData(block.header.mixHash, 32), sha3Uncles: bufferToRpcData(block.header.uncleHash), - logsBloom: pending ? null : bufferToRpcData(block.header.bloom), + logsBloom: bufferToRpcData(block.header.bloom), transactionsRoot: bufferToRpcData(block.header.transactionsTrie), stateRoot: bufferToRpcData(block.header.stateRoot), receiptsRoot: bufferToRpcData(block.header.receiptTrie), diff --git a/packages/hardhat-core/test/internal/hardhat-network/provider/modules/eth/methods/getBlockByNumber.ts b/packages/hardhat-core/test/internal/hardhat-network/provider/modules/eth/methods/getBlockByNumber.ts index a75aba116b..e0401e4583 100644 --- a/packages/hardhat-core/test/internal/hardhat-network/provider/modules/eth/methods/getBlockByNumber.ts +++ b/packages/hardhat-core/test/internal/hardhat-network/provider/modules/eth/methods/getBlockByNumber.ts @@ -103,6 +103,7 @@ describe("Eth module", function () { ["pending", false] ); + assert.isNotEmpty(block.logsBloom); assert.equal(block.transactions.length, 1); assert.equal(block.parentHash, firstBlock.hash); assert.include(block.transactions as string[], txHash);