Skip to content

Commit

Permalink
Pass dynamic state diff commitment
Browse files Browse the repository at this point in the history
  • Loading branch information
kirugan committed Sep 10, 2024
1 parent 44e122b commit 6e41c70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adapters/core2p2p/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments,
Signatures: utils.Map(header.Signatures, AdaptSignature),
StateDiffCommitment: &spec.StateDiffCommitment{
StateDiffLength: stateDiffLength,
Root: AdaptHash(stateDiffCommitment), // todo commitments
Root: AdaptHash(stateDiffCommitment),
},
GasPriceWei: AdaptUint128(header.GasPrice),
DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri),
Expand Down
2 changes: 1 addition & 1 deletion p2p/starknet/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (h *Handler) onHeadersRequest(req *spec.BlockHeadersRequest) (iter.Seq[prot

return &spec.BlockHeadersResponse{
HeaderMessage: &spec.BlockHeadersResponse_Header{
Header: core2p2p.AdaptHeader(header, commitments, stateUpdate.StateDiff.Commitment(),
Header: core2p2p.AdaptHeader(header, commitments, stateUpdate.StateDiff.Hash(),
stateUpdate.StateDiff.Length()),
},
}, nil
Expand Down

0 comments on commit 6e41c70

Please sign in to comment.