From ffd75096928798aaeab681d05352cb45209f181b Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 5 Jul 2019 22:13:06 -1100 Subject: [PATCH] nspv_send -> spend --- src/komodo_nSPV_wallet.h | 4 ++-- src/rpc/server.cpp | 2 +- src/rpc/server.h | 3 ++- src/wallet/rpcdump.cpp | 8 ++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/komodo_nSPV_wallet.h b/src/komodo_nSPV_wallet.h index bada2cb33..8fc0b3ce4 100644 --- a/src/komodo_nSPV_wallet.h +++ b/src/komodo_nSPV_wallet.h @@ -17,7 +17,7 @@ #ifndef KOMODO_NSPVWALLET_H #define KOMODO_NSPVWALLET_H -// nSPV wallet uses superlite functions (and some komodod built in functions) to implement nSPV_send +// nSPV wallet uses superlite functions (and some komodod built in functions) to implement nSPV_spend #define NSPV_AUTOLOGOUT 60 #define NSPV_BRANCHID 0x76b809bb @@ -210,7 +210,7 @@ std::string NSPV_signtx(CMutableTransaction &mtx,uint64_t txfee,CScript opret,st return(EncodeHexTx(mtx)); } -UniValue NSPV_send(char *srcaddr,char *destaddr,int64_t satoshis) // what its all about! +UniValue NSPV_spend(char *srcaddr,char *destaddr,int64_t satoshis) // what its all about! { UniValue result(UniValue::VOBJ); uint8_t rmd160[128]; int64_t txfee = 10000; if ( NSPV_logintime == 0 || time(NULL) > NSPV_logintime+NSPV_AUTOLOGOUT ) diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index c6a51d568..1d5cb83f1 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -424,7 +424,7 @@ static const CRPCCommand vRPCCommands[] = { "nSPV", "nspv_notarizations", &nspv_notarizations, true }, { "nSPV", "nspv_hdrsproof", &nspv_hdrsproof, true }, { "nSPV", "nspv_txproof", &nspv_txproof, true }, - { "nSPV", "nspv_send", &nspv_send, true }, + { "nSPV", "nspv_spend", &nspv_spend, true }, // rewards { "rewards", "rewardslist", &rewardslist, true }, diff --git a/src/rpc/server.h b/src/rpc/server.h index 37cb3d26a..31da0e32f 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -462,7 +462,8 @@ extern UniValue nspv_spentinfo(const UniValue& params, bool fHelp); extern UniValue nspv_notarizations(const UniValue& params, bool fHelp); extern UniValue nspv_hdrsproof(const UniValue& params, bool fHelp); extern UniValue nspv_txproof(const UniValue& params, bool fHelp); -extern UniValue nspv_send(const UniValue& params, bool fHelp); +extern UniValue nspv_spend(const UniValue& params, bool fHelp); +extern UniValue nspv_broadcast(const UniValue& params, bool fHelp); extern UniValue getblocksubsidy(const UniValue& params, bool fHelp); diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 97b458070..c35b54965 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -975,7 +975,7 @@ UniValue z_exportviewingkey(const UniValue& params, bool fHelp) UniValue NSPV_getinfo_json(); UniValue NSPV_login(char *wifstr); UniValue NSPV_addressutxos(char *coinaddr); -UniValue NSPV_send(char *srcaddr,char *destaddr,int64_t satoshis); +UniValue NSPV_spend(char *srcaddr,char *destaddr,int64_t satoshis); UniValue NSPV_spentinfo(uint256 txid,int32_t vout); UniValue NSPV_notarizations(int32_t height); UniValue NSPV_hdrsproof(int32_t prevheight,int32_t nextheight); @@ -1045,16 +1045,16 @@ UniValue nspv_txproof(const UniValue& params, bool fHelp) return(NSPV_txproof(txid,height)); } -UniValue nspv_send(const UniValue& params, bool fHelp) +UniValue nspv_spend(const UniValue& params, bool fHelp) { uint64_t satoshis; if ( fHelp || params.size() != 2 ) - throw runtime_error("nspv_send destaddr amount\n"); + throw runtime_error("nspv_spend destaddr amount\n"); if ( NSPV_address.size() == 0 ) throw runtime_error("to nspv_send you need an active nspv_login\n"); satoshis = atof(params[1].get_str().c_str())*COIN + 0.0000000049; if ( satoshis < 1000 ) throw runtime_error("amount too small\n"); - return(NSPV_send((char *)NSPV_address.c_str(),(char *)params[0].get_str().c_str(),satoshis)); + return(NSPV_spend((char *)NSPV_address.c_str(),(char *)params[0].get_str().c_str(),satoshis)); }