-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make
include_contract_abi
optional (#432)
### Description The new field `include_contract_abi` already was optional for the user-facing type `StacksChainhookNetworkSpecification`, but was not optional for the internal type `StacksChainhookSpecification`. Any time we converted to a `StacksChainhookSpecification`, we'd `.unwrap_or(false)`, which seemed okay. However, a running Chainhook node has the `StacksChainhookSpecification` type saved in redis, so whenever a pre-existing node is restarted after upgrading, it is missing the required `include_contract_abi` field and errors. This PR makes the field optional everywhere. I'll need to think about how to add tests to prevent this sort of bug in the future. ### Checklist - [x] All tests pass - [ ] Tests added in this PR (if applicable)
- Loading branch information
1 parent
da500d7
commit 947b11e
Showing
3 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters