@@ -11,8 +11,8 @@ func InsertEpoch(epoch *dbtypes.Epoch, tx *sqlx.Tx) error {
1111 INSERT INTO epochs (
1212 epoch, validator_count, validator_balance, eligible, voted_target, voted_head, voted_total, block_count, orphaned_count,
1313 attestation_count, deposit_count, exit_count, withdraw_count, withdraw_amount, attester_slashing_count,
14- proposer_slashing_count, bls_change_count, eth_transaction_count, sync_participation
15- ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)
14+ proposer_slashing_count, bls_change_count, eth_transaction_count, sync_participation, payload_count
15+ ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20 )
1616 ON CONFLICT (epoch) DO UPDATE SET
1717 validator_count = excluded.validator_count,
1818 validator_balance = excluded.validator_balance,
@@ -31,17 +31,18 @@ func InsertEpoch(epoch *dbtypes.Epoch, tx *sqlx.Tx) error {
3131 proposer_slashing_count = excluded.proposer_slashing_count,
3232 bls_change_count = excluded.bls_change_count,
3333 eth_transaction_count = excluded.eth_transaction_count,
34- sync_participation = excluded.sync_participation` ,
34+ sync_participation = excluded.sync_participation,
35+ payload_count = excluded.payload_count` ,
3536 dbtypes .DBEngineSqlite : `
3637 INSERT OR REPLACE INTO epochs (
3738 epoch, validator_count, validator_balance, eligible, voted_target, voted_head, voted_total, block_count, orphaned_count,
3839 attestation_count, deposit_count, exit_count, withdraw_count, withdraw_amount, attester_slashing_count,
39- proposer_slashing_count, bls_change_count, eth_transaction_count, sync_participation
40- ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)` ,
40+ proposer_slashing_count, bls_change_count, eth_transaction_count, sync_participation, payload_count
41+ ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20 )` ,
4142 }),
4243 epoch .Epoch , epoch .ValidatorCount , epoch .ValidatorBalance , epoch .Eligible , epoch .VotedTarget , epoch .VotedHead , epoch .VotedTotal , epoch .BlockCount , epoch .OrphanedCount ,
4344 epoch .AttestationCount , epoch .DepositCount , epoch .ExitCount , epoch .WithdrawCount , epoch .WithdrawAmount , epoch .AttesterSlashingCount , epoch .ProposerSlashingCount ,
44- epoch .BLSChangeCount , epoch .EthTransactionCount , epoch .SyncParticipation )
45+ epoch .BLSChangeCount , epoch .EthTransactionCount , epoch .SyncParticipation , epoch . PayloadCount )
4546 if err != nil {
4647 return err
4748 }
@@ -63,7 +64,7 @@ func GetEpochs(firstEpoch uint64, limit uint32) []*dbtypes.Epoch {
6364 SELECT
6465 epoch, validator_count, validator_balance, eligible, voted_target, voted_head, voted_total, block_count, orphaned_count,
6566 attestation_count, deposit_count, exit_count, withdraw_count, withdraw_amount, attester_slashing_count,
66- proposer_slashing_count, bls_change_count, eth_transaction_count, sync_participation
67+ proposer_slashing_count, bls_change_count, eth_transaction_count, sync_participation, payload_count
6768 FROM epochs
6869 WHERE epoch <= $1
6970 ORDER BY epoch DESC
0 commit comments