@ -418,10 +418,10 @@ Value stop(const Array& params, bool fHelp)
if ( fHelp | | params . size ( ) ! = 0 )
if ( fHelp | | params . size ( ) ! = 0 )
throw runtime_error (
throw runtime_error (
" stop \n "
" stop \n "
" Stop b itcoin server. " ) ;
" Stop B itcoin server. " ) ;
// Shutdown will take long enough that the response should get back
// Shutdown will take long enough that the response should get back
QueueShutdown ( ) ;
QueueShutdown ( ) ;
return " b itcoin server stopping" ;
return " B itcoin server stopping" ;
}
}
@ -562,7 +562,7 @@ Value getnewaddress(const Array& params, bool fHelp)
if ( fHelp | | params . size ( ) > 1 )
if ( fHelp | | params . size ( ) > 1 )
throw runtime_error (
throw runtime_error (
" getnewaddress [account] \n "
" getnewaddress [account] \n "
" Returns a new b itcoin address for receiving payments. "
" Returns a new B itcoin address for receiving payments. "
" If [account] is specified (recommended), it is added to the address book "
" If [account] is specified (recommended), it is added to the address book "
" so payments received with the address will be credited to [account]. " ) ;
" so payments received with the address will be credited to [account]. " ) ;
@ -629,7 +629,7 @@ Value getaccountaddress(const Array& params, bool fHelp)
if ( fHelp | | params . size ( ) ! = 1 )
if ( fHelp | | params . size ( ) ! = 1 )
throw runtime_error (
throw runtime_error (
" getaccountaddress <account> \n "
" getaccountaddress <account> \n "
" Returns the current b itcoin address for receiving payments to this account. " ) ;
" Returns the current B itcoin address for receiving payments to this account. " ) ;
// Parse the account first so we don't generate a key if there's an error
// Parse the account first so we don't generate a key if there's an error
string strAccount = AccountFromValue ( params [ 0 ] ) ;
string strAccount = AccountFromValue ( params [ 0 ] ) ;
@ -652,7 +652,7 @@ Value setaccount(const Array& params, bool fHelp)
CBitcoinAddress address ( params [ 0 ] . get_str ( ) ) ;
CBitcoinAddress address ( params [ 0 ] . get_str ( ) ) ;
if ( ! address . IsValid ( ) )
if ( ! address . IsValid ( ) )
throw JSONRPCError ( - 5 , " Invalid b itcoin address " ) ;
throw JSONRPCError ( - 5 , " Invalid B itcoin address " ) ;
string strAccount ;
string strAccount ;
@ -682,7 +682,7 @@ Value getaccount(const Array& params, bool fHelp)
CBitcoinAddress address ( params [ 0 ] . get_str ( ) ) ;
CBitcoinAddress address ( params [ 0 ] . get_str ( ) ) ;
if ( ! address . IsValid ( ) )
if ( ! address . IsValid ( ) )
throw JSONRPCError ( - 5 , " Invalid b itcoin address " ) ;
throw JSONRPCError ( - 5 , " Invalid B itcoin address " ) ;
string strAccount ;
string strAccount ;
map < CBitcoinAddress , string > : : iterator mi = pwalletMain - > mapAddressBook . find ( address ) ;
map < CBitcoinAddress , string > : : iterator mi = pwalletMain - > mapAddressBook . find ( address ) ;
@ -743,7 +743,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
CBitcoinAddress address ( params [ 0 ] . get_str ( ) ) ;
CBitcoinAddress address ( params [ 0 ] . get_str ( ) ) ;
if ( ! address . IsValid ( ) )
if ( ! address . IsValid ( ) )
throw JSONRPCError ( - 5 , " Invalid b itcoin address " ) ;
throw JSONRPCError ( - 5 , " Invalid B itcoin address " ) ;
// Amount
// Amount
int64 nAmount = AmountFromValue ( params [ 1 ] ) ;
int64 nAmount = AmountFromValue ( params [ 1 ] ) ;
@ -841,7 +841,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
CBitcoinAddress address = CBitcoinAddress ( params [ 0 ] . get_str ( ) ) ;
CBitcoinAddress address = CBitcoinAddress ( params [ 0 ] . get_str ( ) ) ;
CScript scriptPubKey ;
CScript scriptPubKey ;
if ( ! address . IsValid ( ) )
if ( ! address . IsValid ( ) )
throw JSONRPCError ( - 5 , " Invalid b itcoin address " ) ;
throw JSONRPCError ( - 5 , " Invalid B itcoin address " ) ;
scriptPubKey . SetBitcoinAddress ( address ) ;
scriptPubKey . SetBitcoinAddress ( address ) ;
if ( ! IsMine ( * pwalletMain , scriptPubKey ) )
if ( ! IsMine ( * pwalletMain , scriptPubKey ) )
return ( double ) 0.0 ;
return ( double ) 0.0 ;
@ -1067,7 +1067,7 @@ Value sendfrom(const Array& params, bool fHelp)
string strAccount = AccountFromValue ( params [ 0 ] ) ;
string strAccount = AccountFromValue ( params [ 0 ] ) ;
CBitcoinAddress address ( params [ 1 ] . get_str ( ) ) ;
CBitcoinAddress address ( params [ 1 ] . get_str ( ) ) ;
if ( ! address . IsValid ( ) )
if ( ! address . IsValid ( ) )
throw JSONRPCError ( - 5 , " Invalid b itcoin address " ) ;
throw JSONRPCError ( - 5 , " Invalid B itcoin address " ) ;
int64 nAmount = AmountFromValue ( params [ 2 ] ) ;
int64 nAmount = AmountFromValue ( params [ 2 ] ) ;
int nMinDepth = 1 ;
int nMinDepth = 1 ;
if ( params . size ( ) > 3 )
if ( params . size ( ) > 3 )
@ -1128,7 +1128,7 @@ Value sendmany(const Array& params, bool fHelp)
{
{
CBitcoinAddress address ( s . name_ ) ;
CBitcoinAddress address ( s . name_ ) ;
if ( ! address . IsValid ( ) )
if ( ! address . IsValid ( ) )
throw JSONRPCError ( - 5 , string ( " Invalid b itcoin address: " ) + s . name_ ) ;
throw JSONRPCError ( - 5 , string ( " Invalid B itcoin address: " ) + s . name_ ) ;
if ( setAddress . count ( address ) )
if ( setAddress . count ( address ) )
throw JSONRPCError ( - 8 , string ( " Invalid parameter, duplicated address: " ) + s . name_ ) ;
throw JSONRPCError ( - 8 , string ( " Invalid parameter, duplicated address: " ) + s . name_ ) ;
@ -1172,7 +1172,7 @@ Value addmultisigaddress(const Array& params, bool fHelp)
{
{
string msg = " addmultisigaddress <nrequired> <'[ \" key \" , \" key \" ]'> [account] \n "
string msg = " addmultisigaddress <nrequired> <'[ \" key \" , \" key \" ]'> [account] \n "
" Add a nrequired-to-sign multisignature address to the wallet \" \n "
" Add a nrequired-to-sign multisignature address to the wallet \" \n "
" each key is a b itcoin address or hex-encoded public key \n "
" each key is a B itcoin address or hex-encoded public key \n "
" If [account] is specified, assign address to [account]. " ;
" If [account] is specified, assign address to [account]. " ;
throw runtime_error ( msg ) ;
throw runtime_error ( msg ) ;
}
}
@ -1196,7 +1196,7 @@ Value addmultisigaddress(const Array& params, bool fHelp)
{
{
const std : : string & ks = keys [ i ] . get_str ( ) ;
const std : : string & ks = keys [ i ] . get_str ( ) ;
// Case 1: b itcoin address and we have full public key:
// Case 1: B itcoin address and we have full public key:
CBitcoinAddress address ( ks ) ;
CBitcoinAddress address ( ks ) ;
if ( address . IsValid ( ) )
if ( address . IsValid ( ) )
{
{
@ -1933,7 +1933,7 @@ Value encryptwallet(const Array& params, bool fHelp)
// slack space in .dat files; that is bad if the old data is
// slack space in .dat files; that is bad if the old data is
// unencrypted private keys. So:
// unencrypted private keys. So:
QueueShutdown ( ) ;
QueueShutdown ( ) ;
return " wallet encrypted; b itcoin server stopping, restart to run with encrypted wallet " ;
return " wallet encrypted; B itcoin server stopping, restart to run with encrypted wallet " ;
}
}