mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 06:44:16 +00:00
Fix the Wallet unit tests by allowing null blocks in Wallet.receive() again.
This commit is contained in:
parent
42b5a0d0ed
commit
6f36e96f66
@ -245,7 +245,8 @@ public class Wallet implements Serializable {
|
|||||||
// accepted by the network.
|
// accepted by the network.
|
||||||
//
|
//
|
||||||
// Mark the tx as appearing in this block so we can find it later after a re-org.
|
// Mark the tx as appearing in this block so we can find it later after a re-org.
|
||||||
wtx.addBlockAppearance(block, bestChain);
|
if (block != null)
|
||||||
|
wtx.addBlockAppearance(block, bestChain);
|
||||||
if (bestChain) {
|
if (bestChain) {
|
||||||
if (valueSentToMe.equals(BigInteger.ZERO)) {
|
if (valueSentToMe.equals(BigInteger.ZERO)) {
|
||||||
// There were no change transactions so this tx is fully spent.
|
// There were no change transactions so this tx is fully spent.
|
||||||
@ -277,7 +278,8 @@ public class Wallet implements Serializable {
|
|||||||
} else {
|
} else {
|
||||||
if (!reorg) {
|
if (!reorg) {
|
||||||
// Mark the tx as appearing in this block so we can find it later after a re-org.
|
// Mark the tx as appearing in this block so we can find it later after a re-org.
|
||||||
tx.addBlockAppearance(block, bestChain);
|
if (block != null)
|
||||||
|
tx.addBlockAppearance(block, bestChain);
|
||||||
}
|
}
|
||||||
// This TX didn't originate with us. It could be sending us coins and also spending our own coins if keys
|
// This TX didn't originate with us. It could be sending us coins and also spending our own coins if keys
|
||||||
// are being shared between different wallets.
|
// are being shared between different wallets.
|
||||||
|
Loading…
Reference in New Issue
Block a user