From 1d0f02227d9f981f9468b0599709d8d8f22889a8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 21 Aug 2018 04:55:58 -1100 Subject: [PATCH] nValue --- src/cc/MofN.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc/MofN.cpp b/src/cc/MofN.cpp index 0a7e861f4..4621a1b16 100644 --- a/src/cc/MofN.cpp +++ b/src/cc/MofN.cpp @@ -138,7 +138,7 @@ int64_t AddMofNInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKe return(totalinputs); } -std::string MofNGet(uint64_t txfee) +std::string MofNGet(uint64_t txfee,int64_t nValue) { CMutableTransaction mtx,tmpmtx; CPubKey mypk,mofnpk; int64_t inputs,CCchange=0; struct CCcontract_info *cp,C; std::string rawhex; uint32_t j; int32_t i,len; uint8_t buf[32768]; bits256 hash; cp = CCinit(&C,EVAL_MOFN); @@ -146,7 +146,7 @@ std::string MofNGet(uint64_t txfee) txfee = 10000; mofnpk = GetUnspendable(cp,0); mypk = pubkey2pk(Mypubkey()); - if ( (inputs= AddMofNInputs(cp,mtx,mofnpk,txfee,60)) > 0 ) + if ( (inputs= AddMofNInputs(cp,mtx,mofnpk,nValue+txfee,60)) > 0 ) { if ( inputs > nValue ) CCchange = (inputs - nValue - txfee);