mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-08-01 12:31:23 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4c04776105 | ||
|
1fbc33f85e | ||
|
5778794635 | ||
|
c01cb2c42f | ||
|
483eda4c65 |
@@ -22,7 +22,7 @@
|
||||
<parent>
|
||||
<groupId>org.bitcoinj</groupId>
|
||||
<artifactId>bitcoinj-parent</artifactId>
|
||||
<version>0.14.2</version>
|
||||
<version>0.14.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bitcoinj-core</artifactId>
|
||||
|
@@ -78,7 +78,7 @@ public class VersionMessage extends Message {
|
||||
public boolean relayTxesBeforeFilter;
|
||||
|
||||
/** The version of this library release, as a string. */
|
||||
public static final String BITCOINJ_VERSION = "0.14.2";
|
||||
public static final String BITCOINJ_VERSION = "0.14.3";
|
||||
/** The value that is prepended to the subVer field of this application. */
|
||||
public static final String LIBRARY_SUBVER = "/bitcoinj:" + BITCOINJ_VERSION + "/";
|
||||
|
||||
|
@@ -433,7 +433,7 @@ public class ScriptBuilder {
|
||||
* the ledger.
|
||||
*/
|
||||
public static Script createOpReturnScript(byte[] data) {
|
||||
checkArgument(data.length <= 40);
|
||||
checkArgument(data.length <= 80);
|
||||
return new ScriptBuilder().op(OP_RETURN).data(data).build();
|
||||
}
|
||||
|
||||
|
@@ -5068,7 +5068,9 @@ public class Wallet extends BaseTaggableObject
|
||||
// Don't hold the wallet lock whilst doing this, so if the broadcaster accesses the wallet at some point there
|
||||
// is no inversion.
|
||||
for (Transaction tx : toBroadcast) {
|
||||
checkState(tx.getConfidence().getConfidenceType() == ConfidenceType.PENDING);
|
||||
ConfidenceType confidenceType = tx.getConfidence().getConfidenceType();
|
||||
checkState(confidenceType == ConfidenceType.PENDING || confidenceType == ConfidenceType.IN_CONFLICT,
|
||||
"Expected PENDING or IN_CONFLICT, was %s.", confidenceType);
|
||||
// Re-broadcast even if it's marked as already seen for two reasons
|
||||
// 1) Old wallets may have transactions marked as broadcast by 1 peer when in reality the network
|
||||
// never saw it, due to bugs.
|
||||
|
@@ -2167,6 +2167,17 @@ public class WalletTest extends TestWithWallet {
|
||||
wallet.completeTx(request);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void opReturnMaxBytes() throws Exception {
|
||||
receiveATransaction(wallet, myAddress);
|
||||
Transaction tx = new Transaction(PARAMS);
|
||||
Script script = ScriptBuilder.createOpReturnScript(new byte[80]);
|
||||
tx.addOutput(Coin.ZERO, script);
|
||||
SendRequest request = SendRequest.forTx(tx);
|
||||
request.ensureMinRequiredFee = true;
|
||||
wallet.completeTx(request);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void opReturnOneOutputWithValueTest() throws Exception {
|
||||
// Tests basic send of transaction with one output that destroys coins and has an OP_RETURN.
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<groupId>org.bitcoinj</groupId>
|
||||
<artifactId>bitcoinj-parent</artifactId>
|
||||
<version>0.14.2</version>
|
||||
<version>0.14.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>org.bitcoinj</groupId>
|
||||
<artifactId>bitcoinj-parent</artifactId>
|
||||
<version>0.14.2</version>
|
||||
<version>0.14.3</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<parent>
|
||||
<groupId>org.bitcoinj</groupId>
|
||||
<artifactId>bitcoinj-parent</artifactId>
|
||||
<version>0.14.2</version>
|
||||
<version>0.14.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.bitcoinj</groupId>
|
||||
<artifactId>bitcoinj-parent</artifactId>
|
||||
<version>0.14.2</version>
|
||||
<version>0.14.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>wallettemplate</artifactId>
|
||||
|
Reference in New Issue
Block a user