-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
Function `waitForChainConfirmation` has been moved to a separate file and made public. This is because it can be reused in some other places.
Implemented deposit state confirmations upon monitoring stop event and action execution for the retrieve pubkey monitoring.
Implemented deposit state confirmations upon monitoring stop event and action execution for remaining monitoring instances.
# Conflicts: # pkg/extensions/tbtc/tbtc.go
Keep closed and terminated events should be confirmed similarly as regular monitoring stop events to handle chain reorgs properly.
func newTestTBTC(chain chain.TBTCHandle) *tbtc { | ||
tbtc := newTBTC(chain) | ||
|
||
tbtc.blockConfirmations = defaultLocalBlockConfirmations | ||
|
||
return tbtc | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with just:
return &tbtc{
chain: chain,
blockConfirmations: defaultBlockConfirmations,
}
and got rid of newTBTC
function that is used only here and in Initalize
. See that we are getting nothing with newTBTC
and we need to set the field to something else right after it's called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR #600 will give more sense for the newTBTC
function. Also, the tbtc
struct will probably grow over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I'll leave this discussion open for now but let's don't care about it for this PR and revisit once we merge #600.
Refs: #574
Depends on: #591
Depends on: keep-network/keep-common#56
Implemented chain confirmations upon monitoring stop events and after executing monitoring actions. This should prevent problems that may occur due to chain reorganizations.