From c5032f46df0e7c6a8d8a1200c4b7ab7245f6e31e Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 4 Mar 2019 00:59:44 -1100 Subject: [PATCH] Test --- src/cc/dilithium.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cc/dilithium.c b/src/cc/dilithium.c index 4a181e7c5..a82113ebc 100644 --- a/src/cc/dilithium.c +++ b/src/cc/dilithium.c @@ -3527,8 +3527,8 @@ bool dilithium_Rvalidate(struct CCcontract_info *cp,int32_t height,Eval *eval,co if ( hashstr->destpubtxid != txid ) { if ( hashstr->destpubtxid != zeroid ) - fprintf(stderr,"overwriting %s %s with %s\n",handle.c_str(),hashstr->destpubtxid.GetHex().c_str(),txid.GetHex().c_str()); - fprintf(stderr,"%s <- %s\n",handle.c_str(),txid.GetHex().c_str()); + fprintf(stderr,"ht.%d overwriting %s %s with %s\n",height,handle.c_str(),hashstr->destpubtxid.GetHex().c_str(),txid.GetHex().c_str()); + fprintf(stderr,"ht.%d %s <- %s\n",height,handle.c_str(),txid.GetHex().c_str()); hashstr->destpubtxid = txid; } } @@ -3565,7 +3565,11 @@ bool dilithium_Rvalidate(struct CCcontract_info *cp,int32_t height,Eval *eval,co else if ( dilithium_registrationpub33(oldpub33,hashstr->destpubtxid) == 0 ) { if ( oldpub33 == pub33 ) + { + hashstr->destpubtxid = txid; + fprintf(stderr,"ht.%d %s <- %s\n",height,handle.c_str(),txid.GetHex().c_str()); return(true); + } } return eval->Invalid("duplicate dilithium handle rejected"); }