Skip to content

Commit

Permalink
Encode missing TxHash, GasUsed, and Logs fields for storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Aug 26, 2024
1 parent a426b5d commit 34e2cd9
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion common/proto_common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/rawdb/db.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 30 additions & 30 deletions core/types/proto_block.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions core/types/proto_block.proto
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ message ProtoAccessTuple {
message ProtoReceiptForStorage {
bytes post_state_or_status = 1;
uint64 cumulative_gas_used = 2;
common.ProtoHash tx_hash = 3;
common.ProtoAddress contract_address = 4;
ProtoLogsForStorage logs = 5;
ProtoTransactions etxs = 6;
uint64 gas_used = 7;
ProtoLogsForStorage logs = 3;
common.ProtoHash tx_hash = 4;
common.ProtoAddress contract_address = 5;
uint64 gas_used = 6;
ProtoTransactions etxs = 7;
}

message ProtoReceiptsForStorage {
Expand Down
3 changes: 3 additions & 0 deletions core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ func (r *ReceiptForStorage) ProtoEncode() (*ProtoReceiptForStorage, error) {
ProtoReceiptForStorage := &ProtoReceiptForStorage{
PostStateOrStatus: (*Receipt)(r).statusEncoding(),
CumulativeGasUsed: r.CumulativeGasUsed,
TxHash: r.TxHash.ProtoEncode(),
ContractAddress: r.ContractAddress.ProtoEncode(),
GasUsed: r.GasUsed,
}
protoEtxs, err := r.Etxs.ProtoEncode()
if err != nil {
Expand All @@ -255,6 +257,7 @@ func (r *ReceiptForStorage) ProtoEncode() (*ProtoReceiptForStorage, error) {
protoLog := (*LogForStorage)(log).ProtoEncode()
protoLogs.Logs[i] = protoLog
}
ProtoReceiptForStorage.Logs = protoLogs
return ProtoReceiptForStorage, nil
}

Expand Down
2 changes: 1 addition & 1 deletion p2p/node/peerManager/peerdb/peer_info.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion p2p/pb/quai_messages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 34e2cd9

Please sign in to comment.