Skip to content

Commit

Permalink
Add cli argument for nanopay txn fee
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <zyl.skysniper@gmail.com>
  • Loading branch information
yilunzhang committed Mar 16, 2022
1 parent 302bd6c commit 882434c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions bin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func main() {
tunaServiceName := flag.String("tsn", "", "tuna reverse service name")
tunaSubscriptionPrefix := flag.String("tsp", "", "tuna subscription prefix")
tunaMaxPrice := flag.String("tuna-max-price", "0.01", "tuna max price in unit of NKN/MB")
tunaMinFee := flag.String("tuna-min-fee", "0.00001", "tuna nanopay minimal txn fee")
tunaFeeRatio := flag.Float64("tuna-fee-ratio", 0.1, "tuna nanopay txn fee ratio")
tunaDownloadGeoDB := flag.Bool("tuna-download-geo-db", false, "download tuna geo db to disk")
tunaGeoDBPath := flag.String("tuna-geo-db-path", ".", "path to store tuna geo db")
tunaMeasureBandwidth := flag.Bool("tuna-measure-bandwidth", false, "tuna measure bandwidth")
Expand Down Expand Up @@ -100,6 +102,8 @@ func main() {
TunaServiceName: *tunaServiceName,
TunaSubscriptionPrefix: *tunaSubscriptionPrefix,
TunaMaxPrice: *tunaMaxPrice,
TunaMinNanoPayFee: *tunaMinFee,
TunaNanoPayFeeRatio: *tunaFeeRatio,
TunaDownloadGeoDB: *tunaDownloadGeoDB,
TunaGeoDBPath: *tunaGeoDBPath,
TunaMeasureBandwidth: *tunaMeasureBandwidth,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/imdario/mergo v0.3.9
github.com/nknorg/ncp-go v1.0.4-0.20220224111535-206abfb10fe8
github.com/nknorg/nkn-sdk-go v1.4.0
github.com/nknorg/nkn-tuna-session v0.2.4
github.com/nknorg/nkn-tuna-session v0.2.5-0.20220316092834-0446308e0a84
github.com/nknorg/nkngomobile v0.0.0-20220125080321-848ddd2e5157
github.com/nknorg/tuna v0.0.0-20220314110655-e94a8631389d
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ github.com/nknorg/ncp-go v1.0.4-0.20220224111535-206abfb10fe8/go.mod h1:ALtnk9lK
github.com/nknorg/nkn-sdk-go v1.3.7/go.mod h1:JSksFP+VQ0S54Ztiht6WHC3tNZklcGg+JaxENuFnqRc=
github.com/nknorg/nkn-sdk-go v1.4.0 h1:1rBhjLBfAoOWIkvV837nkjQ9CdTa+X1kmR8a1kLhGtM=
github.com/nknorg/nkn-sdk-go v1.4.0/go.mod h1:/2FtpRM4mWpze03V8FIoESQCa6wCdPRPQO9HqpIMNYw=
github.com/nknorg/nkn-tuna-session v0.2.4 h1:hUPkLXZQ/PLx+QckHctoERn8XymtrjYKDGEiNpctuQU=
github.com/nknorg/nkn-tuna-session v0.2.4/go.mod h1:KhlcmTIZW8U+5A5/jwpOp6kOJrFZDsqQiKlQmD5p9+s=
github.com/nknorg/nkn-tuna-session v0.2.5-0.20220316092834-0446308e0a84 h1:Dy27irtZ1+CEy7pNRqrMCkIfuGvusIKkMM611dw+xm4=
github.com/nknorg/nkn-tuna-session v0.2.5-0.20220316092834-0446308e0a84/go.mod h1:KhlcmTIZW8U+5A5/jwpOp6kOJrFZDsqQiKlQmD5p9+s=
github.com/nknorg/nkn/v2 v2.0.6/go.mod h1:cXl2WTv72trEXKJiNH0dCMygMtL8nJne07dWajDlRIo=
github.com/nknorg/nkn/v2 v2.1.7/go.mod h1:4xzrHJCI/FDFZmlt606Mn9ScKY4UUCFoaWydL1TzQRs=
github.com/nknorg/nkn/v2 v2.1.8 h1:h25rqQ0E8CvlN8Jm4zF6CBBLgwdoSS7HHdrU4ZYcmjA=
Expand Down

0 comments on commit 882434c

Please sign in to comment.