From 7e47549603bc04ded54228c56a590cb8ccb7c730 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 9 Jul 2019 02:04:54 -1100 Subject: [PATCH] Fix signing legacy check --- src/komodo_nSPV_wallet.h | 2 +- src/main.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_nSPV_wallet.h b/src/komodo_nSPV_wallet.h index e0a477ed3..6cf2e82c6 100644 --- a/src/komodo_nSPV_wallet.h +++ b/src/komodo_nSPV_wallet.h @@ -132,7 +132,7 @@ bool NSPV_SignTx(CMutableTransaction &mtx,int32_t vini,int64_t utxovalue,const C fprintf(stderr,"%02x",((uint8_t *)&scriptPubKey)[i]); fprintf(stderr," scriptPubKey\n"); } - if ( nTime < KOMODO_SAPLING_ACTIVATION ) + if ( nTime != 0 && nTime < KOMODO_SAPLING_ACTIVATION ) { fprintf(stderr,"use legacy sig validation\n"); branchid = 0; diff --git a/src/main.cpp b/src/main.cpp index b4ecc6922..a8ff33c2b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3974,7 +3974,8 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) { void FlushStateToDisk() { CValidationState state; - FlushStateToDisk(state, FLUSH_STATE_ALWAYS); + if ( KOMODO_NSPV == 0 ) + FlushStateToDisk(state, FLUSH_STATE_ALWAYS); } void PruneAndFlush() {