This repository was archived by the owner on Mar 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/src/main/java/com/greenaddress/greenbits Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1252,12 +1252,12 @@ public Coin apply(@Nullable List<Boolean> input) {
12521252 outValue = outValue .add (out .getValue ());
12531253 }
12541254 final Coin fee = inValue .subtract (outValue );
1255- if (fee .compareTo (Coin .valueOf (10000 )) == -1 ) {
1256- throw new IllegalArgumentException ("Verification: Fee is too small (expected at least 10000 satoshi)." );
1255+ if (fee .compareTo (Coin .valueOf (1000 )) == -1 ) {
1256+ throw new IllegalArgumentException ("Verification: Fee is too small (expected at least 1000 satoshi)." );
12571257 }
1258- int kB = (transaction .decoded .getMessageSize () + 999 ) / 1000 ;
1259- if (fee .compareTo (Coin .valueOf (kB * 20000 )) == 1 ) {
1260- throw new IllegalArgumentException ("Verification: Fee is too large (expected at most 20000 satoshi per kB)." );
1258+ int kBfee = (int )( 500000.0 * (( double ) transaction .decoded .getMessageSize ()) / 1000.0 ) ;
1259+ if (fee .compareTo (Coin .valueOf (kBfee )) == 1 ) {
1260+ throw new IllegalArgumentException ("Verification: Fee is too large (expected at most 500000 satoshi per kB)." );
12611261 }
12621262 return fee ;
12631263 }
You can’t perform that action at this time.
0 commit comments