Merge pull request #2489 from filecoin-project/fix/chainwatch/restore-block-reward
Restore base block reward; capture WinCount w header
This commit is contained in:
commit
aba6eaf532
@ -118,11 +118,8 @@ func (p *Processor) processRewardActors(ctx context.Context, rewardTips ActorTip
|
|||||||
return nil, xerrors.Errorf("unmarshal state (@ %s): %w", rw.common.stateroot.String(), err)
|
return nil, xerrors.Errorf("unmarshal state (@ %s): %w", rw.common.stateroot.String(), err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Resolve Actor API shift
|
rw.baseBlockReward = rewardActorState.ThisEpochReward
|
||||||
//rw.baseBlockReward = rewardActorState.LastPerEpochReward
|
rw.baselinePower = rewardActorState.ThisEpochBaselinePower
|
||||||
//rw.baselinePower = rewardActorState.BaselinePower
|
|
||||||
rw.baseBlockReward = big.Zero()
|
|
||||||
rw.baselinePower = big.Zero()
|
|
||||||
out = append(out, rw)
|
out = append(out, rw)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,8 @@ create table if not exists blocks
|
|||||||
miner text not null,
|
miner text not null,
|
||||||
timestamp bigint not null,
|
timestamp bigint not null,
|
||||||
ticket bytea not null,
|
ticket bytea not null,
|
||||||
eprof bytea,
|
election_proof bytea,
|
||||||
|
win_count bigint,
|
||||||
forksig bigint not null
|
forksig bigint not null
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -401,15 +402,16 @@ create temp table b (like blocks excluding constraints) on commit drop;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stmt2, err := tx.Prepare(`copy b (cid, parentWeight, parentStateRoot, height, miner, "timestamp", ticket, eprof, forksig) from stdin`)
|
stmt2, err := tx.Prepare(`copy b (cid, parentWeight, parentStateRoot, height, miner, "timestamp", ticket, election_proof, win_count, forksig) from stdin`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, bh := range bhs {
|
for _, bh := range bhs {
|
||||||
var eprof interface{}
|
var eproof, winCount interface{}
|
||||||
if bh.ElectionProof != nil {
|
if bh.ElectionProof != nil {
|
||||||
eprof = bh.ElectionProof.VRFProof
|
eproof = bh.ElectionProof.VRFProof
|
||||||
|
winCount = bh.ElectionProof.WinCount
|
||||||
}
|
}
|
||||||
|
|
||||||
if bh.Ticket == nil {
|
if bh.Ticket == nil {
|
||||||
@ -428,7 +430,8 @@ create temp table b (like blocks excluding constraints) on commit drop;
|
|||||||
bh.Miner.String(),
|
bh.Miner.String(),
|
||||||
bh.Timestamp,
|
bh.Timestamp,
|
||||||
bh.Ticket.VRFProof,
|
bh.Ticket.VRFProof,
|
||||||
eprof,
|
eproof,
|
||||||
|
winCount,
|
||||||
bh.ForkSignaling); err != nil {
|
bh.ForkSignaling); err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user