-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Fee Ratio #2032
Add Fee Ratio #2032
Changes from 2 commits
2a4f3cb
3630511
0e8f866
fe9d3e1
472d113
153b295
fbd3ebc
7970200
f7a8bc6
610d768
9aace9f
1abfc6f
f4e9330
9c0ad3a
7e67f44
cb59e8f
aa29222
700d782
ee56bf6
dab166b
d3a36e6
de87b08
379e7ae
c23472c
a082979
0df7915
e49b825
f11a75e
e778f02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,7 +294,7 @@ public virtual VerifyResult VerifyStateDependent(StoreView snapshot, Transaction | |
foreach (TransactionAttribute attribute in Attributes) | ||
if (!attribute.Verify(snapshot, this)) | ||
return VerifyResult.Invalid; | ||
long net_fee = NetworkFee - Size * NativeContract.Policy.GetFeePerByte(snapshot); | ||
long net_fee = NetworkFee * NativeContract.Policy.GetFeeRatio(snapshot) - Size * NativeContract.Policy.GetFeePerByte(snapshot); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is the same, but maybe: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have fixed, please have a check |
||
if (!this.VerifyWitnesses(snapshot, net_fee, WitnessFlag.StateDependent)) | ||
return VerifyResult.Invalid; | ||
return VerifyResult.Succeed; | ||
|
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.
Very good. I like this design.
Thus, ratio 0.5 makes the network more expensive.