chore: modify breath block interval for test (#2054)

This commit is contained in:
Roshan 2023-12-11 17:12:42 +08:00 committed by GitHub
parent 3414e5672a
commit 6744d7c15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 4 deletions

@ -3926,6 +3926,19 @@ const stakeABI = `
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "BREATH_BLOCK_INTERVAL",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "DEAD_ADDRESS",
@ -4028,6 +4041,24 @@ const stakeABI = `
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "claimBatch",
"inputs": [
{
"name": "operatorAddresses",
"type": "address[]",
"internalType": "address[]"
},
{
"name": "requestNumbers",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "createValidator",
@ -4347,6 +4378,11 @@ const stakeABI = `
"type": "address",
"internalType": "address"
},
{
"name": "createdTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "voteAddress",
"type": "bytes",
@ -4491,7 +4527,7 @@ const stakeABI = `
"internalType": "address"
},
{
"name": "dayIndex",
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
@ -4515,7 +4551,7 @@ const stakeABI = `
"internalType": "address"
},
{
"name": "dayIndex",
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
@ -5198,6 +5234,11 @@ const stakeABI = `
"name": "InvalidMoniker",
"inputs": []
},
{
"type": "error",
"name": "InvalidRequest",
"inputs": []
},
{
"type": "error",
"name": "InvalidValue",

@ -1178,7 +1178,7 @@ func (p *Parlia) Finalize(chain consensus.ChainHeaderReader, header *types.Heade
if p.chainConfig.IsFeynman(header.Number, header.Time) {
// TODO: revert this
// if time.Unix(int64(parent.Time), 0).Day() < time.Unix(int64(header.Time), 0).Day() {
if time.Unix(int64(header.Time), 0).Minute()%5 > time.Unix(int64(parent.Time), 0).Minute()%5 {
if time.Unix(int64(header.Time), 0).Minute() > time.Unix(int64(parent.Time), 0).Minute() {
if err := p.updateValidatorSetV2(state, header, cx, txs, receipts, systemTxs, usedGas, false); err != nil {
return err
}
@ -1262,7 +1262,7 @@ func (p *Parlia) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *
if p.chainConfig.IsFeynman(header.Number, header.Time) {
// TODO: revert this
// if time.Unix(int64(parent.Time), 0).Day() < time.Unix(int64(header.Time), 0).Day() {
if time.Unix(int64(header.Time), 0).Minute()%5 > time.Unix(int64(parent.Time), 0).Minute()%5 {
if time.Unix(int64(header.Time), 0).Minute() > time.Unix(int64(parent.Time), 0).Minute() {
if err := p.updateValidatorSetV2(state, header, cx, &txs, &receipts, nil, &header.GasUsed, true); err != nil {
return nil, nil, err
}