-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use babylon params instead of global parameters #151
Conversation
@@ -55,9 +46,9 @@ var checkDaemonHealthCmd = cli.Command{ | |||
Usage: "Check if staker daemon is running.", | |||
Flags: []cli.Flag{ | |||
cli.StringFlag{ | |||
Name: stakingDaemonAddressFlag, | |||
Name: helpers.StakingDaemonAddressFlag, |
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.
just moved a few duplicate flags to get from helpers
@@ -138,14 +129,14 @@ var stakeCmd = cli.Command{ | |||
var stakeFromPhase1Cmd = cli.Command{ | |||
Name: "stake-from-phase1", | |||
ShortName: "stfp1", | |||
Usage: "\nstakercli daemon stake-from-phase1 [fullpath/to/global_parameters.json]" + | |||
Usage: "\nstakercli daemon stake-from-phase1" + |
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.
removed the expected path of global parameters
Usage: "Inclusion height of the staking transactions. Necessary to chose correct global parameters for transaction", | ||
Required: true, | ||
Required: false, |
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.
inclusion height is not required anymore, it can load from the btc node
…from create-phase1-unbonding-transaction and create-phase1-withdrawal-transaction
StakingParams []BtcStakingParams `json:"staking_params"` | ||
} | ||
|
||
type BtcStakingParams struct { |
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.
the only params needed to parse the staking tx
walletcontroller/interface.go
Outdated
@@ -114,3 +116,16 @@ func StkTxV0ParsedWithBlock( | |||
|
|||
return parsedStakingTx, notifierTx, status, nil | |||
} | |||
|
|||
func ParseV0StakingTx( |
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.
still let the option to validate the tag if it is provided
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.
In general code looks good but imo it can be simplified a bit
…er based on the BTC block height
stakercli daemon stake-from-phase1
use babylon params instead of global parametersstakercli transaction create-phase1-unbonding-transaction
andstakercli transaction create-phase1-withdrawal-transaction
add the option for the flag "tx-inclusion-height" be optional (load from the btc node if not set)