mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 14:50:57 +01:00
Wallet: don't save wallet and invoke event listeners when adding watched scripts if the call was a no-op.
This commit is contained in:
parent
e9f016b753
commit
3cdb039a29
1 changed files with 4 additions and 2 deletions
|
@ -766,8 +766,10 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
|
||||||
} finally {
|
} finally {
|
||||||
keychainLock.writeLock().unlock();
|
keychainLock.writeLock().unlock();
|
||||||
}
|
}
|
||||||
queueOnScriptsChanged(scripts, true);
|
if (added > 0) {
|
||||||
saveNow();
|
queueOnScriptsChanged(scripts, true);
|
||||||
|
saveNow();
|
||||||
|
}
|
||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue