-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use updated sign
method
#128
Conversation
Smaller coin units should be filtered, so that there is enough amount in the output for the fee deduction.
This is draft until it is merged step-by-step with bosagora/agora#2370. |
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.
LGTM just some extra whitespace.
source/faucet/main.d
Outdated
Transaction tx = txb | ||
.sign(OutputType.Payment, 0, &this.keyUnlocker); | ||
Transaction tx = txb.unlockSigner(&this.keyUnlocker) | ||
.sign(OutputType.Payment, 0); |
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.
Extra whitespace.
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.
Updated.
source/faucet/main.d
Outdated
@@ -274,7 +274,8 @@ public class Faucet : FaucetAPI | |||
auto builder = TxBuilder( | |||
secret_keys.byKey().drop(uniform(0, secret_keys.length, rndGen)).front()); | |||
builder.attach(utxo_rng); | |||
return builder.sign(OutputType.Payment, 0, &this.keyUnlocker); | |||
return builder.unlockSigner(&this.keyUnlocker) | |||
.sign(OutputType.Payment, 0); |
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.
Extra whitespace.
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.
Where is the whitespace?
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.
Before the .sign
. Should be like line 275.
8b16aac
to
6052dc2
Compare
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.
LGTM but default params for sign can be used.
Transition from the deprecated sign to the new sign.
Updated |
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.
LGTM
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.
LGTM
return utxo_rng | ||
.filter!(tup => tup.value.output.value >= Amount(count)) | ||
.filter!(tup => tup.value.output.value >= minInputValuePerOutput * count) | ||
.map!(tup => TxBuilder(tup.value.output, tup.key)) | ||
.map!(txb => txb.split( | ||
.map!(txb => txb.unlockSigner(&this.keyUnlocker).split( |
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 think we should be a bit smarter here (attaching to multiple UTXOs) but for now this works.
Transition from the
deprecated
sign
to the newsign
.Also includes a commit which filters
Amount
s less than5,000,000
.Smaller coin units should be filtered, so that there is enough amount in the output for the fee deduction.
Part of #26