Skip to content

Commit

Permalink
fix gas price
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouop0 committed Feb 11, 2024
1 parent e058f2f commit fb1d945
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/b2node/b2node.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ type GasPriceRsp struct {
}

func NewNodeClient(privateKeyHex string, chainID string, address string, grpcConn *grpc.ClientConn,
rpcURL string, denom string) *NodeClient {
rpcURL string, denom string,
) *NodeClient {
privatekeyBytes, err := hex.DecodeString(privateKeyHex)
if nil != err {
panic(err)
Expand Down
7 changes: 5 additions & 2 deletions pkg/inscribe/inscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,15 @@ func NewInscriptionRequest(btcAPIClient btcapi.Client, address btcutil.Address,
commitTxPrivateKeyList = append(commitTxPrivateKeyList, privateKey)
}
recommendedFees, err := btcAPIClient.GetRecommendedFees()
if err != nil {
return nil, err
}

return &InscriptionRequest{
CommitTxOutPointList: commitTxOutPointList,
CommitTxPrivateKeyList: commitTxPrivateKeyList,
CommitFeeRate: recommendedFees.FastestFee,
FeeRate: recommendedFees.FastestFee + 1,
CommitFeeRate: recommendedFees.FastestFee + 1,
FeeRate: recommendedFees.FastestFee + 2,
DataList: dataList,
SingleRevealTxOnly: false,
}, nil
Expand Down

0 comments on commit fb1d945

Please sign in to comment.