Skip to content

Commit

Permalink
standalone: Add decreasing timestamps ASERT test.
Browse files Browse the repository at this point in the history
This adds another scenario to the ASERT test vectors to ensure the
expected behavior with decreasing timestamps.
  • Loading branch information
davecgh committed Aug 21, 2023
1 parent 4f00f59 commit 0a35adc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions blockchain/standalone/testdata/asert_test_vectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,21 @@
{"height": 4, "timestamp": 1199, "expectedDiffBits": 453027237}
]
},
{
"description": "mainnet: blocks with 1s decreasing timestamps",
"params": "mainnet",
"startDiffBits": 453027238,
"startHeight": 0,
"startTime": 300,
"tests": [
{"height": 1, "timestamp": 299, "expectedDiffBits": 453027034},
{"height": 2, "timestamp": 298, "expectedDiffBits": 453026831},
{"height": 3, "timestamp": 297, "expectedDiffBits": 453026629},
{"height": 4, "timestamp": 296, "expectedDiffBits": 453026428},
{"height": 5, "timestamp": 295, "expectedDiffBits": 453026228},
{"height": 6, "timestamp": 294, "expectedDiffBits": 453026029}
]
},
{
"description": "testnet: steady 120s blocks at proof of work limit",
"params": "testnet",
Expand Down

0 comments on commit 0a35adc

Please sign in to comment.