Conversation
jkawan
commented
Mar 1, 2025
- Exposed/Added era in chainsync input while updating status
- Added unit test to test if era is added during status update
Signed-off-by: Jenita <jkawan@blinklabs.io>
Signed-off-by: Jenita <jkawan@blinklabs.io>
There was a problem hiding this comment.
Instead of using the slot number to determine the era, we can use the block type. There should be an Era() function on the block object that tells us which era that it's from. This won't work for rollback, but we can leave the era blank like we do for block number.
input/chainsync/chainsync.go
Outdated
| default: | ||
| return "Conway" // future era | ||
| } | ||
| } |
There was a problem hiding this comment.
These values are only valid for one particular network (presumably mainnet). We should either make sure they are only consulted for that one network, or that we provide values for additional well-known networks (such as preview and preprod)
There was a problem hiding this comment.
I have made the changes to use the Era name from block, could you please review.
Signed-off-by: Jenita <kawanjenita@outlook.com>
agaffney
left a comment
There was a problem hiding this comment.
Assuming that this is for #129, we want to add the era to the event context. It's probably not particularly useful to expose via the "update status" callback. We should probably be able to do everything we need in the NewBlockContext() function
Signed-off-by: Jenita <kawanjenita@outlook.com>
Signed-off-by: Jenita <kawanjenita@outlook.com>