Commit 435f0a48 authored by bitcoinj-sv's avatar bitcoinj-sv

fixed missed fee

fix canonical tx
parent ce926217
......@@ -109,7 +109,7 @@ public class Transaction extends ChildMessage {
* If using this feePerKb, transactions will get confirmed within the next couple of blocks.
* This should be adjusted from time to time. Last adjustment: February 2017.
*/
public static final Coin DEFAULT_TX_FEE = Coin.valueOf(100000); // 1 mBTC
public static final Coin DEFAULT_TX_FEE = Coin.valueOf(5000); // 0.5 mBTC
/**
* Any standard (ie pay-to-address) output smaller than this value (in satoshis) will most likely be rejected by the network.
......
......@@ -106,7 +106,7 @@ public class TransactionSignature extends ECKey.ECDSASignature {
if (signature.length < 9 || signature.length > 73)
return false;
int hashType = (signature[signature.length-1] & 0xff) & ~Transaction.SigHash.ANYONECANPAY.value; // mask the byte to prevent sign-extension hurting us
int hashType = (signature[signature.length-1] & 0xff) & ~(Transaction.SigHash.ANYONECANPAY.value| SigHash.FORKID.value); // mask the byte to prevent sign-extension hurting us
if (hashType < Transaction.SigHash.ALL.value || hashType > Transaction.SigHash.SINGLE.value)
return false;
......@@ -177,7 +177,7 @@ public class TransactionSignature extends ECKey.ECDSASignature {
@Override
public ECKey.ECDSASignature toCanonicalised() {
return new TransactionSignature(super.toCanonicalised(), sigHashMode(), anyoneCanPay());
return new TransactionSignature(super.toCanonicalised(), sigHashMode(), anyoneCanPay(), useForkId());
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment