Fix bug in IncrementNoteWitness()
This commit is contained in:
@@ -704,7 +704,8 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex,
|
|||||||
// If this is our note, witness it
|
// If this is our note, witness it
|
||||||
if (txIsOurs) {
|
if (txIsOurs) {
|
||||||
JSOutPoint jsoutpt {hash, i, j};
|
JSOutPoint jsoutpt {hash, i, j};
|
||||||
if (mapWallet[hash].mapNoteData.count(jsoutpt)) {
|
if (mapWallet[hash].mapNoteData.count(jsoutpt) &&
|
||||||
|
mapWallet[hash].mapNoteData[jsoutpt].witnessHeight < pindex->nHeight) {
|
||||||
CNoteData* nd = &(mapWallet[hash].mapNoteData[jsoutpt]);
|
CNoteData* nd = &(mapWallet[hash].mapNoteData[jsoutpt]);
|
||||||
if (nd->witnesses.size() > 0) {
|
if (nd->witnesses.size() > 0) {
|
||||||
// We think this can happen because we write out the
|
// We think this can happen because we write out the
|
||||||
|
|||||||
Reference in New Issue
Block a user