Merge pull request #2899 from filecoin-project/feat/cw-block-basefee

chainwatch: Record parent_base_fee in blocks
This commit is contained in:
Łukasz Magiera 2020-08-07 18:46:29 +02:00 committed by GitHub
commit 70f93da5dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -30,8 +30,8 @@ create table if not exists messages
"to" text not null,
nonce bigint not null,
value text not null,
gas_fee_cap bigint not null,
gas_premium bigint not null,
gas_fee_cap text not null,
gas_premium text not null,
gas_limit bigint not null,
method bigint,
params bytea

View File

@ -112,6 +112,7 @@ create table if not exists blocks
ticket bytea not null,
election_proof bytea,
win_count bigint,
parent_base_fee text not null,
forksig bigint not null
);
@ -402,7 +403,7 @@ create temp table b (like blocks excluding constraints) on commit drop;
}
}
stmt2, err := tx.Prepare(`copy b (cid, parentWeight, parentStateRoot, height, miner, "timestamp", ticket, election_proof, win_count, forksig) from stdin`)
stmt2, err := tx.Prepare(`copy b (cid, parentWeight, parentStateRoot, height, miner, "timestamp", ticket, election_proof, win_count, parent_base_fee, forksig) from stdin`)
if err != nil {
return err
}
@ -432,6 +433,7 @@ create temp table b (like blocks excluding constraints) on commit drop;
bh.Ticket.VRFProof,
eproof,
winCount,
bh.ParentBaseFee.String(),
bh.ForkSignaling); err != nil {
log.Error(err)
}