Skip to content

Commit

Permalink
fix: add ProofInBlocks to chain config (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Sep 25, 2023
1 parent ba2fa09 commit 4f3c822
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions consensus/beacon/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (beacon *Beacon) FinalizeAndAssemble(chain consensus.ChainHeaderReader, hea
k verkle.StateDiff
keys = state.Witness().Keys()
)
if chain.Config().IsPrague(header.Number, header.Time) && chain.Config().ProofInBlock {
if chain.Config().IsPrague(header.Number, header.Time) && chain.Config().ProofInBlocks {
// Open the pre-tree to prove the pre-state against
parent := chain.GetHeaderByNumber(header.Number.Uint64() - 1)
if parent == nil {
Expand Down Expand Up @@ -448,7 +448,7 @@ func (beacon *Beacon) FinalizeAndAssemble(chain consensus.ChainHeaderReader, hea

// Assemble and return the final block.
block := types.NewBlockWithWithdrawals(header, txs, uncles, receipts, withdrawals, trie.NewStackTrie(nil))
if chain.Config().IsPrague(header.Number, header.Time) && chain.Config().ProofInBlock {
if chain.Config().IsPrague(header.Number, header.Time) && chain.Config().ProofInBlocks {
block.SetVerkleProof(p, k)
}
return block, nil
Expand Down
2 changes: 1 addition & 1 deletion core/state_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func TestProcessVerkle(t *testing.T) {
PragueTime: u64(0),
TerminalTotalDifficulty: common.Big0,
TerminalTotalDifficultyPassed: true,
ProofInBlock: true,
ProofInBlocks: true,
}
signer = types.LatestSigner(config)
testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
Expand Down
2 changes: 1 addition & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ type ChainConfig struct {
IsDevMode bool `json:"isDev,omitempty"`

// Proof in block
ProofInBlock bool `json:"proofInBlock,omitempty"`
ProofInBlocks bool `json:"proofInBlocks,omitempty"`
}

// EthashConfig is the consensus engine configs for proof-of-work based sealing.
Expand Down

0 comments on commit 4f3c822

Please sign in to comment.