Skip to content

Commit fb9dd4b

Browse files
author
Mak Muftic
committed
README cleanup and expand tests
1 parent 7daf98e commit fb9dd4b

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ When starting _vedran loadbalancer_ it is possible to configure automatic payout
124124

125125
`--payout-reward` - defined total reward amount that will be distributed on the payout (amount in Planck). If omitted, the entire balance of lb wallet will be used as a total reward, and in this case `--lb-payout-fee-address` must be set
126126

127-
`--lb-payout-address` - address on which load balancer fee will be sent. If omitted, load balancer fee will be left on load balancer wallet after payout. This flag is **required** if `--payout-reward` is set to 0
127+
`--lb-payout-address` - address on which load balancer fee will be sent. If omitted, load balancer fee will be left on load balancer wallet after payout. This flag is **required** if `--payout-reward` is not set (or set to -1)
128128

129129
If all flags have been provided, then each {_payout-interval_} days automatic payout will be started.
130130

@@ -136,7 +136,7 @@ It is possible to run payout script at any time by invoking `vedran payout` comm
136136

137137
`--payout-reward` - defined total reward amount that will be distributed on the payout (amount in Planck). If omitted, the entire balance of lb wallet will be used as a total reward, and in this case `--lb-payout-fee-address` must be set
138138

139-
`--lb-payout-fee-address` - address on which load balancer fee will be sent. If omitted, load balancer fee will be left on load balancer wallet after payout. This flag is **required** if `--payout-reward` is set to 0
139+
`--lb-payout-fee-address` - address on which load balancer fee will be sent. If omitted, load balancer fee will be left on load balancer wallet after payout. This flag is **required** if `--payout-reward` is not set (or set to -1)
140140

141141
Additionally, it is possible to change URL on which payout script will connect with loadbalancer when executing transactions by setting flag (default value will be _http://localhost:80_)
142142

cmd/validation_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ func TestValidatePayoutFlags(t *testing.T) {
2222
},
2323
{
2424
name: "invalid flags, missing reward address",
25-
payoutReward: "",
25+
payoutReward: "-1",
26+
payoutAddress: "",
27+
validateReturns: float64(0),
28+
validateError: true,
29+
},
30+
{
31+
name: "invalid flags, negative reward",
32+
payoutReward: "-100",
2633
payoutAddress: "",
2734
validateReturns: float64(0),
2835
validateError: true,

0 commit comments

Comments
 (0)