]> Git Repo - VerusCoin.git/commitdiff
Test
authorjl777 <[email protected]>
Tue, 28 Aug 2018 14:00:53 +0000 (03:00 -1100)
committerjl777 <[email protected]>
Tue, 28 Aug 2018 14:00:53 +0000 (03:00 -1100)
src/cc/CCchannels.h
src/cc/channels.cpp
src/wallet/rpcwallet.cpp

index 30e1aeb7850771fff2d3a51f1e341785929f2bd5..9f84ba7532bde51b5fd3df3320a7b2a4934f51fb 100644 (file)
@@ -21,7 +21,7 @@
 #define CHANNELS_MAXPAYMENTS 1000
 
 bool ChannelsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx);
-std::string ChannelOpen(uint64_t txfee,CPubKey destpub,int32_t numpayments,int32_t payment);
+std::string ChannelOpen(uint64_t txfee,CPubKey destpub,int32_t numpayments,int64_t payment);
 
 // CCcustom
 UniValue ChannelsInfo();
index 098bfa2a381b93acc203b4d0770a8f2dc9d64436..fef4553d940c257a19045435c712b6b5b9f8d132 100644 (file)
@@ -172,12 +172,12 @@ int64_t AddChannelsInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CP
     return(totalinputs);
 }
 
-std::string ChannelOpen(uint64_t txfee,CPubKey destpub,int32_t numpayments,int32_t payment)
+std::string ChannelOpen(uint64_t txfee,CPubKey destpub,int32_t numpayments,int64_t payment)
 {
     CMutableTransaction mtx; uint8_t hash[32],hashdest[32]; uint64_t funds; int32_t i; uint256 hashchain,entropy,hentropy; CPubKey mypk; CScript opret; struct CCcontract_info *cp,C;
     if ( numpayments <= 0 || payment <= 0 || numpayments > CHANNELS_MAXPAYMENTS )
     {
-        CCerror = strprintf("invalid ChannelsFund param numpayments.%d max.%d payment.%d\n",numpayments,CHANNELS_MAXPAYMENTS,payment);
+        CCerror = strprintf("invalid ChannelsFund param numpayments.%d max.%d payment.%lld\n",numpayments,CHANNELS_MAXPAYMENTS,(long long)payment);
         fprintf(stderr,"%s\n",CCerror.c_str());
         return("");
     }
index 114f4e22dee2a18834f3640187e7bbb4f161ef89..c05f01d1a05f6ccd0815cb8257a945f1aaa6159d 100644 (file)
@@ -5089,7 +5089,7 @@ UniValue tokenaddress(const UniValue& params, bool fHelp)
 
 UniValue channelsopen(const UniValue& params, bool fHelp)
 {
-    UniValue result(UniValue::VOBJ); char destaddr[64]; int32_t numpayments,payment; std::vector<unsigned char> destpub; struct CCcontract_info *cp,C; std::string hex;
+    UniValue result(UniValue::VOBJ); char destaddr[64]; int32_t numpayments; int64_t payment; std::vector<unsigned char> destpub; struct CCcontract_info *cp,C; std::string hex;
     cp = CCinit(&C,EVAL_CHANNELS);
     if ( fHelp || params.size() != 3 )
         throw runtime_error("channelsopen destpubkey numpayments payment\n");
@@ -5098,7 +5098,7 @@ UniValue channelsopen(const UniValue& params, bool fHelp)
     LOCK(cs_main);
     destpub = ParseHex(params[0].get_str().c_str());
     numpayments = atoi(params[1].get_str().c_str());
-    payment = atoi(params[2].get_str().c_str());
+    payment = atol(params[2].get_str().c_str());
     hex = ChannelOpen(0,pubkey2pk(destpub),numpayments,payment);
     if ( hex.size() > 0 )
     {
This page took 0.054249 seconds and 4 git commands to generate.