Merge remote-tracking branch 'origin/flo-master' into flo-master
# Conflicts: # src/primitives/transaction.h # src/qt/transactiondesc.cpp # src/wallet/rpcwallet.cpp
This commit is contained in:
commit
caeb773b95
0
src/qt/forms/sendcoinsdialog.ui
Normal file → Executable file
0
src/qt/forms/sendcoinsdialog.ui
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 103 KiB |
@ -241,6 +241,13 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
|
||||
if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
|
||||
strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
|
||||
|
||||
//
|
||||
// FLO Data
|
||||
//
|
||||
if (!wtx.tx->strFloData.empty())
|
||||
strHTML += "<br><b>" + tr("FLO Data") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.tx->strFloData, true) + "<br>";
|
||||
|
||||
|
||||
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + rec->getTxID() + "<br>";
|
||||
strHTML += "<b>" + tr("Transaction total size") + ":</b> " + QString::number(wtx.tx->GetTotalSize()) + " bytes<br>";
|
||||
strHTML += "<b>" + tr("Output index") + ":</b> " + QString::number(rec->getOutputIndex()) + "<br>";
|
||||
@ -271,10 +278,6 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
|
||||
strHTML += "<br>" + tr("Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.").arg(QString::number(numBlocksToMaturity)) + "<br>";
|
||||
}
|
||||
|
||||
// FLO Data
|
||||
if (!wtx.tx->strFloData.empty())
|
||||
strHTML += "<br><b>" + tr("FLO Data") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.tx->strFloData, true) + "<br>";
|
||||
|
||||
//
|
||||
// Debug view
|
||||
//
|
||||
|
||||
@ -34,6 +34,11 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
|
||||
CAmount nNet = nCredit - nDebit;
|
||||
uint256 hash = wtx.GetHash();
|
||||
std::string flodata = "";
|
||||
if (!wtx.tx->strFloData.empty())
|
||||
{
|
||||
flodata = wtx.tx->strFloData;
|
||||
}
|
||||
std::map<std::string, std::string> mapValue = wtx.mapValue;
|
||||
|
||||
if (nNet > 0 || wtx.IsCoinBase())
|
||||
@ -51,6 +56,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
CTxDestination address;
|
||||
sub.idx = i; // vout index
|
||||
sub.credit = txout.nValue;
|
||||
sub.flodata = flodata;
|
||||
sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
|
||||
if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
|
||||
{
|
||||
@ -70,7 +76,8 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
sub.type = TransactionRecord::Generated;
|
||||
}
|
||||
|
||||
parts.append(sub);
|
||||
if (sub.credit != 0)
|
||||
parts.append(sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -99,7 +106,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
CAmount nChange = wtx.GetChange();
|
||||
|
||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
|
||||
-(nDebit - nChange), nCredit - nChange));
|
||||
-(nDebit - nChange), nCredit - nChange, flodata));
|
||||
parts.last().involvesWatchAddress = involvesWatchAddress; // maybe pass to TransactionRecord as constructor argument
|
||||
}
|
||||
else if (fAllFromMe)
|
||||
@ -114,6 +121,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
const CTxOut& txout = wtx.tx->vout[nOut];
|
||||
TransactionRecord sub(hash, nTime);
|
||||
sub.idx = nOut;
|
||||
sub.flodata = flodata;
|
||||
sub.involvesWatchAddress = involvesWatchAddress;
|
||||
|
||||
if(wallet->IsMine(txout))
|
||||
@ -146,7 +154,8 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
}
|
||||
sub.debit = -nValue;
|
||||
|
||||
parts.append(sub);
|
||||
if (sub.debit != 0)
|
||||
parts.append(sub);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -154,7 +163,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
|
||||
//
|
||||
// Mixed debit transaction, can't break down payees
|
||||
//
|
||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0));
|
||||
parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0, flodata));
|
||||
parts.last().involvesWatchAddress = involvesWatchAddress;
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,21 +87,22 @@ public:
|
||||
static const int RecommendedNumConfirmations = 6;
|
||||
|
||||
TransactionRecord():
|
||||
hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
|
||||
hash(), time(0), type(Other), address(""), debit(0), credit(0), flodata(""), idx(0)
|
||||
{
|
||||
}
|
||||
|
||||
TransactionRecord(uint256 _hash, qint64 _time):
|
||||
hash(_hash), time(_time), type(Other), address(""), debit(0),
|
||||
credit(0), idx(0)
|
||||
credit(0), flodata(""), idx(0)
|
||||
{
|
||||
}
|
||||
|
||||
TransactionRecord(uint256 _hash, qint64 _time,
|
||||
Type _type, const std::string &_address,
|
||||
const CAmount& _debit, const CAmount& _credit):
|
||||
const CAmount& _debit, const CAmount& _credit,
|
||||
const std::string &flodata):
|
||||
hash(_hash), time(_time), type(_type), address(_address), debit(_debit), credit(_credit),
|
||||
idx(0)
|
||||
flodata(flodata), idx(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -118,6 +119,7 @@ public:
|
||||
std::string address;
|
||||
CAmount debit;
|
||||
CAmount credit;
|
||||
std::string flodata;
|
||||
/**@}*/
|
||||
|
||||
/** Subtransaction index, for sort key */
|
||||
|
||||
@ -34,6 +34,7 @@ static int column_alignments[] = {
|
||||
Qt::AlignLeft|Qt::AlignVCenter, /* date */
|
||||
Qt::AlignLeft|Qt::AlignVCenter, /* type */
|
||||
Qt::AlignLeft|Qt::AlignVCenter, /* address */
|
||||
Qt::AlignLeft|Qt::AlignVCenter, /* flo-data */
|
||||
Qt::AlignRight|Qt::AlignVCenter /* amount */
|
||||
};
|
||||
|
||||
@ -246,7 +247,7 @@ TransactionTableModel::TransactionTableModel(const PlatformStyle *_platformStyle
|
||||
fProcessingQueuedTransactions(false),
|
||||
platformStyle(_platformStyle)
|
||||
{
|
||||
columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
|
||||
columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << tr("FLO Data") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
|
||||
priv->refreshWallet();
|
||||
|
||||
connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
||||
@ -429,6 +430,24 @@ QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, b
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString TransactionTableModel::formatFloData(const TransactionRecord *wtx, bool tooltip) const
|
||||
{
|
||||
switch(wtx->type)
|
||||
{
|
||||
case TransactionRecord::RecvFromOther:
|
||||
case TransactionRecord::RecvWithAddress:
|
||||
case TransactionRecord::SendToAddress:
|
||||
case TransactionRecord::SendToOther:
|
||||
case TransactionRecord::SendToSelf:
|
||||
return QString::fromStdString(wtx->flodata);
|
||||
case TransactionRecord::Generated:
|
||||
return "";
|
||||
default:
|
||||
return tr("(n/a)");
|
||||
}
|
||||
}
|
||||
|
||||
QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
|
||||
{
|
||||
// Show addresses without label in a less visible color
|
||||
@ -517,6 +536,8 @@ QString TransactionTableModel::formatTooltip(const TransactionRecord *rec) const
|
||||
rec->type==TransactionRecord::SendToAddress || rec->type==TransactionRecord::RecvWithAddress)
|
||||
{
|
||||
tooltip += QString(" ") + formatTxToAddress(rec, true);
|
||||
if (rec->flodata.length() > 0)
|
||||
tooltip += QString("\n") + formatFloData(rec, true);
|
||||
}
|
||||
return tooltip;
|
||||
}
|
||||
@ -554,6 +575,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
||||
return formatTxType(rec);
|
||||
case ToAddress:
|
||||
return formatTxToAddress(rec, false);
|
||||
case FloData:
|
||||
return formatFloData(rec, false);
|
||||
case Amount:
|
||||
return formatTxAmount(rec, true, BitcoinUnits::separatorAlways);
|
||||
}
|
||||
@ -572,6 +595,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
|
||||
return (rec->involvesWatchAddress ? 1 : 0);
|
||||
case ToAddress:
|
||||
return formatTxToAddress(rec, true);
|
||||
case FloData:
|
||||
return formatFloData(rec, false);
|
||||
case Amount:
|
||||
return qint64(rec->credit + rec->debit);
|
||||
}
|
||||
@ -686,6 +711,8 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat
|
||||
return tr("Whether or not a watch-only address is involved in this transaction.");
|
||||
case ToAddress:
|
||||
return tr("User-defined intent/purpose of the transaction.");
|
||||
case FloData:
|
||||
return tr("FLO Data");
|
||||
case Amount:
|
||||
return tr("Amount removed from or added to balance.");
|
||||
}
|
||||
|
||||
@ -34,7 +34,8 @@ public:
|
||||
Date = 2,
|
||||
Type = 3,
|
||||
ToAddress = 4,
|
||||
Amount = 5
|
||||
FloData = 5,
|
||||
Amount = 6
|
||||
};
|
||||
|
||||
/** Roles to get specific information from a transaction row.
|
||||
@ -100,6 +101,7 @@ private:
|
||||
QString formatTxType(const TransactionRecord *wtx) const;
|
||||
QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const;
|
||||
QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true, BitcoinUnits::SeparatorStyle separators=BitcoinUnits::separatorStandard) const;
|
||||
QString formatFloData(const TransactionRecord *wtx, bool tooltip) const;
|
||||
QString formatTooltip(const TransactionRecord *rec) const;
|
||||
QVariant txStatusDecoration(const TransactionRecord *wtx) const;
|
||||
QVariant txWatchonlyDecoration(const TransactionRecord *wtx) const;
|
||||
|
||||
@ -218,6 +218,8 @@ void TransactionView::setModel(WalletModel *_model)
|
||||
transactionView->setColumnWidth(TransactionTableModel::Watchonly, WATCHONLY_COLUMN_WIDTH);
|
||||
transactionView->setColumnWidth(TransactionTableModel::Date, DATE_COLUMN_WIDTH);
|
||||
transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH);
|
||||
transactionView->setColumnWidth(TransactionTableModel::ToAddress, ADDRESS_COLUMN_WIDTH);
|
||||
transactionView->setColumnWidth(TransactionTableModel::FloData, FLODATA_COLUMN_WIDTH);
|
||||
transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH);
|
||||
|
||||
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH, this);
|
||||
@ -586,7 +588,7 @@ void TransactionView::focusTransaction(const QModelIndex &idx)
|
||||
void TransactionView::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
columnResizingFixer->stretchColumnWidth(TransactionTableModel::ToAddress);
|
||||
columnResizingFixer->stretchColumnWidth(TransactionTableModel::FloData);
|
||||
}
|
||||
|
||||
// Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text
|
||||
|
||||
@ -55,7 +55,9 @@ public:
|
||||
WATCHONLY_COLUMN_WIDTH = 23,
|
||||
DATE_COLUMN_WIDTH = 120,
|
||||
TYPE_COLUMN_WIDTH = 113,
|
||||
ADDRESS_COLUMN_WIDTH = 240,
|
||||
AMOUNT_MINIMUM_COLUMN_WIDTH = 120,
|
||||
FLODATA_COLUMN_WIDTH = 120,
|
||||
MINIMUM_COLUMN_WIDTH = 23
|
||||
};
|
||||
|
||||
|
||||
@ -120,6 +120,7 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
" \"flo-data\" : \"flo-data\", (string, optional) FLO data field (default = \"\").\n"
|
||||
" \"blockhash\" : \"hash\", (string) the block hash\n"
|
||||
" \"confirmations\" : n, (numeric) The confirmations\n"
|
||||
" \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n"
|
||||
@ -471,6 +472,7 @@ UniValue decoderawtransaction(const JSONRPCRequest& request)
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
" \"flo-data\" : \"flo-data\", (string, optional) FLO data field (default = \"\").\n"
|
||||
"}\n"
|
||||
|
||||
"\nExamples:\n"
|
||||
|
||||
@ -270,8 +270,8 @@ UniValue setaccount(const JSONRPCRequest& request)
|
||||
"1. \"address\" (string, required) The flo address to be associated with an account.\n"
|
||||
"2. \"account\" (string, required) The account to assign the address to.\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("setaccount", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\" \"tabby\"")
|
||||
+ HelpExampleRpc("setaccount", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\", \"tabby\"")
|
||||
+ HelpExampleCli("setaccount", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" \"tabby\"")
|
||||
+ HelpExampleRpc("setaccount", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\", \"tabby\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -318,8 +318,8 @@ UniValue getaccount(const JSONRPCRequest& request)
|
||||
"\nResult:\n"
|
||||
"\"accountname\" (string) the account address\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("getaccount", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\"")
|
||||
+ HelpExampleRpc("getaccount", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\"")
|
||||
+ HelpExampleCli("getaccount", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\"")
|
||||
+ HelpExampleRpc("getaccount", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -445,10 +445,10 @@ UniValue sendtoaddress(const JSONRPCRequest& request)
|
||||
"\nResult:\n"
|
||||
"\"txid\" (string) The transaction id.\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("sendtoaddress", "\"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\" 0.1")
|
||||
+ HelpExampleCli("sendtoaddress", "\"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\" 0.1 \"donation\" \"seans outpost\"")
|
||||
+ HelpExampleCli("sendtoaddress", "\"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\" 0.1 \"\" \"\" true")
|
||||
+ HelpExampleRpc("sendtoaddress", "\"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\", 0.1, \"donation\", \"seans outpost\"")
|
||||
+ HelpExampleCli("sendtoaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 0.1")
|
||||
+ HelpExampleCli("sendtoaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 0.1 \"donation\" \"seans outpost\"")
|
||||
+ HelpExampleCli("sendtoaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 0.1 \"\" \"\" true")
|
||||
+ HelpExampleRpc("sendtoaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\", 0.1, \"donation\", \"seans outpost\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -575,11 +575,11 @@ UniValue signmessage(const JSONRPCRequest& request)
|
||||
"\nUnlock the wallet for 30 seconds\n"
|
||||
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
|
||||
"\nCreate the signature\n"
|
||||
+ HelpExampleCli("signmessage", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\" \"my message\"") +
|
||||
+ HelpExampleCli("signmessage", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" \"my message\"") +
|
||||
"\nVerify the signature\n"
|
||||
+ HelpExampleCli("verifymessage", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\" \"signature\" \"my message\"") +
|
||||
+ HelpExampleCli("verifymessage", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" \"signature\" \"my message\"") +
|
||||
"\nAs json rpc\n"
|
||||
+ HelpExampleRpc("signmessage", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\", \"my message\"")
|
||||
+ HelpExampleRpc("signmessage", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\", \"my message\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -631,13 +631,13 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request)
|
||||
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received at this address.\n"
|
||||
"\nExamples:\n"
|
||||
"\nThe amount from transactions with at least 1 confirmation\n"
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\"") +
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\"") +
|
||||
"\nThe amount including unconfirmed transactions, zero confirmations\n"
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\" 0") +
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 0") +
|
||||
"\nThe amount with at least 6 confirmations\n"
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\" 6") +
|
||||
+ HelpExampleCli("getreceivedbyaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 6") +
|
||||
"\nAs a json rpc call\n"
|
||||
+ HelpExampleRpc("getreceivedbyaddress", "\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\", 6")
|
||||
+ HelpExampleRpc("getreceivedbyaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\", 6")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -884,16 +884,16 @@ UniValue sendfrom(const JSONRPCRequest& request)
|
||||
"6. \"comment_to\" (string, optional) An optional comment to store the name of the person or organization \n"
|
||||
" to which you're sending the transaction. This is not part of the transaction, \n"
|
||||
" it is just kept in your wallet.\n"
|
||||
"7. flo-data (string, optional) Transaction comment (default = \"\").\n"
|
||||
"7. flo-data (string, optional) FLO data field (default = \"\").\n"
|
||||
"\nResult:\n"
|
||||
"\"txid\" (string) The transaction id.\n"
|
||||
"\nExamples:\n"
|
||||
"\nSend 0.01 " + CURRENCY_UNIT + " from the default account to the address, must have at least 1 confirmation\n"
|
||||
+ HelpExampleCli("sendfrom", "\"\" \"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\" 0.01") +
|
||||
+ HelpExampleCli("sendfrom", "\"\" \"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 0.01") +
|
||||
"\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n"
|
||||
+ HelpExampleCli("sendfrom", "\"tabby\" \"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\" 0.01 6 \"donation\" \"seans outpost\"") +
|
||||
+ HelpExampleCli("sendfrom", "\"tabby\" \"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 0.01 6 \"donation\" \"seans outpost\"") +
|
||||
"\nAs a json rpc call\n"
|
||||
+ HelpExampleRpc("sendfrom", "\"tabby\", \"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\", 0.01, 6, \"donation\", \"seans outpost\"")
|
||||
+ HelpExampleRpc("sendfrom", "\"tabby\", \"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\", 0.01, 6, \"donation\", \"seans outpost\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -970,19 +970,19 @@ UniValue sendmany(const JSONRPCRequest& request)
|
||||
" \"UNSET\"\n"
|
||||
" \"ECONOMICAL\"\n"
|
||||
" \"CONSERVATIVE\"\n"
|
||||
"9. flo-data (string, optional) Transaction comment (default = \"\").\n"
|
||||
"9. flo-data (string, optional) FLO data field (default = \"\").\n"
|
||||
"\nResult:\n"
|
||||
"\"txid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n"
|
||||
" the number of addresses.\n"
|
||||
"\nExamples:\n"
|
||||
"\nSend two amounts to two different addresses:\n"
|
||||
+ HelpExampleCli("sendmany", "\"\" \"{\\\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\\\":0.01,\\\"LbhhnrHHVFP1eUjP1tdNIYeEVsNHfN9FCw\\\":0.02}\"") +
|
||||
+ HelpExampleCli("sendmany", "\"\" \"{\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\":0.01,\\\"FJYCkfj4i9CayDosxhwTfLq5sqirx19kJV\\\":0.02}\"") +
|
||||
"\nSend two amounts to two different addresses setting the confirmation and comment:\n"
|
||||
+ HelpExampleCli("sendmany", "\"\" \"{\\\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\\\":0.01,\\\"LbhhnrHHVFP1eUjP1tdNIYeEVsNHfN9FCw\\\":0.02}\" 6 \"testing\"") +
|
||||
+ HelpExampleCli("sendmany", "\"\" \"{\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\":0.01,\\\"FJYCkfj4i9CayDosxhwTfLq5sqirx19kJV\\\":0.02}\" 6 \"testing\"") +
|
||||
"\nSend two amounts to two different addresses, subtract fee from amount:\n"
|
||||
+ HelpExampleCli("sendmany", "\"\" \"{\\\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\\\":0.01,\\\"LbhhnrHHVFP1eUjP1tdNIYeEVsNHfN9FCw\\\":0.02}\" 1 \"\" \"[\\\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\\\",\\\"LbhhnrHHVFP1eUjP1tdNIYeEVsNHfN9FCw\\\"]\"") +
|
||||
+ HelpExampleCli("sendmany", "\"\" \"{\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\":0.01,\\\"FJYCkfj4i9CayDosxhwTfLq5sqirx19kJV\\\":0.02}\" 1 \"\" \"[\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\",\\\"FJYCkfj4i9CayDosxhwTfLq5sqirx19kJV\\\"]\"") +
|
||||
"\nAs a json rpc call\n"
|
||||
+ HelpExampleRpc("sendmany", "\"\", \"{\\\"LEr4hNAefWYhBMgxCFP2Po1NPrUeiK8kM2\\\":0.01,\\\"LbhhnrHHVFP1eUjP1tdNIYeEVsNHfN9FCw\\\":0.02}\", 6, \"testing\"")
|
||||
+ HelpExampleRpc("sendmany", "\"\", \"{\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\":0.01,\\\"FJYCkfj4i9CayDosxhwTfLq5sqirx19kJV\\\":0.02}\", 6, \"testing\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -1113,9 +1113,9 @@ UniValue addmultisigaddress(const JSONRPCRequest& request)
|
||||
|
||||
"\nExamples:\n"
|
||||
"\nAdd a multisig address from 2 addresses\n"
|
||||
+ HelpExampleCli("addmultisigaddress", "2 \"[\\\"LEr4hnAefwYhBmGxcFP2Po1NPrUEIk8KM2\\\",\\\"LYKr1oaPSqShthukmLDhdZsqUJgzVnQiAQ\\\"]\"") +
|
||||
+ HelpExampleCli("addmultisigaddress", "2 \"[\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\",\\\"F6sCDMSJxKiKe5nxVVKJCepJJubdsdFHFK\\\"]\"") +
|
||||
"\nAs json rpc call\n"
|
||||
+ HelpExampleRpc("addmultisigaddress", "2, \"[\\\"LEr4hnAefwYhBmGxcFP2Po1NPrUEIk8KM2\\\",\\\"LYKr1oaPSqShthukmLDhdZsqUJgzVnQiAQ\\\"]\"")
|
||||
+ HelpExampleRpc("addmultisigaddress", "2, \"[\\\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\\\",\\\"F6sCDMSJxKiKe5nxVVKJCepJJubdsdFHFK\\\"]\"")
|
||||
;
|
||||
throw std::runtime_error(msg);
|
||||
}
|
||||
@ -1830,8 +1830,8 @@ UniValue listsinceblock(const JSONRPCRequest& request)
|
||||
"}\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("listsinceblock", "")
|
||||
+ HelpExampleCli("listsinceblock", "\"2c5a0ff9e4d8a7cdece6cc0f11d8f949a0c58b2028fab79b90485a811253e217\" 6")
|
||||
+ HelpExampleRpc("listsinceblock", "\"2c5a0ff9e4d8a7cdece6cc0f11d8f949a0c58b2028fab79b90485a811253e217\", 6")
|
||||
+ HelpExampleCli("listsinceblock", "\"e99f498b8e13e1d962140734ea1d363681ad2ddb9fe4237b850443fb6e6a9681\" 6")
|
||||
+ HelpExampleRpc("listsinceblock", "\"e99f498b8e13e1d962140734ea1d363681ad2ddb9fe4237b850443fb6e6a9681\", 6")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -1959,9 +1959,9 @@ UniValue gettransaction(const JSONRPCRequest& request)
|
||||
"}\n"
|
||||
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("gettransaction", "\"c1700d6dd3e690866de56686e893cbe4e637eb5d84e3591cdfbbdbb0fcee49f8\"")
|
||||
+ HelpExampleCli("gettransaction", "\"c1700d6dd3e690866de56686e893cbe4e637eb5d84e3591cdfbbdbb0fcee49f8\" true")
|
||||
+ HelpExampleRpc("gettransaction", "\"c1700d6dd3e690866de56686e893cbe4e637eb5d84e3591cdfbbdbb0fcee49f8\"")
|
||||
+ HelpExampleCli("gettransaction", "\"c447a8d53d76afc466b31e78ced51e49f6b143031b2e7892643404133ba9e249\"")
|
||||
+ HelpExampleCli("gettransaction", "\"c447a8d53d76afc466b31e78ced51e49f6b143031b2e7892643404133ba9e249\" true")
|
||||
+ HelpExampleRpc("gettransaction", "\"c447a8d53d76afc466b31e78ced51e49f6b143031b2e7892643404133ba9e249\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -2020,8 +2020,8 @@ UniValue abandontransaction(const JSONRPCRequest& request)
|
||||
"1. \"txid\" (string, required) The transaction id\n"
|
||||
"\nResult:\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("abandontransaction", "\"c1700d6dd3e690866de56686e893cbe4e637eb5d84e3591cdfbbdbb0fcee49f8\"")
|
||||
+ HelpExampleRpc("abandontransaction", "\"c1700d6dd3e690866de56686e893cbe4e637eb5d84e3591cdfbbdbb0fcee49f8\"")
|
||||
+ HelpExampleCli("abandontransaction", "\"c447a8d53d76afc466b31e78ced51e49f6b143031b2e7892643404133ba9e249\"")
|
||||
+ HelpExampleRpc("abandontransaction", "\"c447a8d53d76afc466b31e78ced51e49f6b143031b2e7892643404133ba9e249\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -2248,7 +2248,7 @@ UniValue walletlock(const JSONRPCRequest& request)
|
||||
"\nSet the passphrase for 2 minutes to perform a transaction\n"
|
||||
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\" 120") +
|
||||
"\nPerform a send (requires passphrase set)\n"
|
||||
+ HelpExampleCli("sendtoaddress", "\"LEr4HnaefWYHbMGXcFp2Po1NPRUeIk8km2\" 1.0") +
|
||||
+ HelpExampleCli("sendtoaddress", "\"FQ5VFz73Ncw9chozAApnhppCpKhhYMX9vP\" 1.0") +
|
||||
"\nClear the passphrase since we are done before 2 minutes is up\n"
|
||||
+ HelpExampleCli("walletlock", "") +
|
||||
"\nAs json rpc call\n"
|
||||
@ -2368,13 +2368,13 @@ UniValue lockunspent(const JSONRPCRequest& request)
|
||||
"\nList the unspent transactions\n"
|
||||
+ HelpExampleCli("listunspent", "") +
|
||||
"\nLock an unspent transaction\n"
|
||||
+ HelpExampleCli("lockunspent", "false \"[{\\\"txid\\\":\\\"daaf44ec1e64e66ffda4a7e195ea60d5c8c8b602fc6bf22928582d3ff2530462\\\",\\\"vout\\\":1}]\"") +
|
||||
+ HelpExampleCli("lockunspent", "false \"[{\\\"txid\\\":\\\"ba7c3a15065f48ddf9b163d1b417963d07ddfd3cd757e73ac9c2860a6d1b27f1\\\",\\\"vout\\\":1}]\"") +
|
||||
"\nList the locked transactions\n"
|
||||
+ HelpExampleCli("listlockunspent", "") +
|
||||
"\nUnlock the transaction again\n"
|
||||
+ HelpExampleCli("lockunspent", "true \"[{\\\"txid\\\":\\\"daaf44ec1e64e66ffda4a7e195ea60d5c8c8b602fc6bf22928582d3ff2530462\\\",\\\"vout\\\":1}]\"") +
|
||||
+ HelpExampleCli("lockunspent", "true \"[{\\\"txid\\\":\\\"ba7c3a15065f48ddf9b163d1b417963d07ddfd3cd757e73ac9c2860a6d1b27f1\\\",\\\"vout\\\":1}]\"") +
|
||||
"\nAs a json rpc call\n"
|
||||
+ HelpExampleRpc("lockunspent", "false, \"[{\\\"txid\\\":\\\"daaf44ec1e64e66ffda4a7e195ea60d5c8c8b602fc6bf22928582d3ff2530462\\\",\\\"vout\\\":1}]\"")
|
||||
+ HelpExampleRpc("lockunspent", "false, \"[{\\\"txid\\\":\\\"ba7c3a15065f48ddf9b163d1b417963d07ddfd3cd757e73ac9c2860a6d1b27f1\\\",\\\"vout\\\":1}]\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwallet->cs_wallet);
|
||||
@ -2448,11 +2448,11 @@ UniValue listlockunspent(const JSONRPCRequest& request)
|
||||
"\nList the unspent transactions\n"
|
||||
+ HelpExampleCli("listunspent", "") +
|
||||
"\nLock an unspent transaction\n"
|
||||
+ HelpExampleCli("lockunspent", "false \"[{\\\"txid\\\":\\\"daaf44ec1e64e66ffda4a7e195ea60d5c8c8b602fc6bf22928582d3ff2530462\\\",\\\"vout\\\":1}]\"") +
|
||||
+ HelpExampleCli("lockunspent", "false \"[{\\\"txid\\\":\\\"ba7c3a15065f48ddf9b163d1b417963d07ddfd3cd757e73ac9c2860a6d1b27f1\\\",\\\"vout\\\":1}]\"") +
|
||||
"\nList the locked transactions\n"
|
||||
+ HelpExampleCli("listlockunspent", "") +
|
||||
"\nUnlock the transaction again\n"
|
||||
+ HelpExampleCli("lockunspent", "true \"[{\\\"txid\\\":\\\"daaf44ec1e64e66ffda4a7e195ea60d5c8c8b602fc6bf22928582d3ff2530462\\\",\\\"vout\\\":1}]\"") +
|
||||
+ HelpExampleCli("lockunspent", "true \"[{\\\"txid\\\":\\\"ba7c3a15065f48ddf9b163d1b417963d07ddfd3cd757e73ac9c2860a6d1b27f1\\\",\\\"vout\\\":1}]\"") +
|
||||
"\nAs a json rpc call\n"
|
||||
+ HelpExampleRpc("listlockunspent", "")
|
||||
);
|
||||
@ -2681,8 +2681,8 @@ UniValue listunspent(const JSONRPCRequest& request)
|
||||
|
||||
"\nExamples\n"
|
||||
+ HelpExampleCli("listunspent", "")
|
||||
+ HelpExampleCli("listunspent", "6 9999999 \"[\\\"LGPYcOdyoBnraaWX5tknkJZZWafjRAGVzx\\\",\\\"LLmraTr3qBjE2YseA3CnZ55la4TQmWnRY3\\\"]\"")
|
||||
+ HelpExampleRpc("listunspent", "6, 9999999 \"[\\\"LGPYcOdyoBnraaWX5tknkJZZWafjRAGVzx\\\",\\\"LLmraTr3qBjE2YseA3CnZ55la4TQmWnRY3\\\"]\"")
|
||||
+ HelpExampleCli("listunspent", "6 9999999 \"[\\\"F7yrmxCmH7pCariTTA6dbqa5NpFB8qzbGe\\\",\\\"F718DyTeJkuNHMcFqY4LK142xmZGNU7tB5\\\"]\"")
|
||||
+ HelpExampleRpc("listunspent", "6, 9999999 \"[\\\"F7yrmxCmH7pCariTTA6dbqa5NpFB8qzbGe\\\",\\\"F718DyTeJkuNHMcFqY4LK142xmZGNU7tB5\\\"]\"")
|
||||
+ HelpExampleCli("listunspent", "6 9999999 '[]' true '{ \"minimumAmount\": 0.005 }'")
|
||||
+ HelpExampleRpc("listunspent", "6, 9999999, [] , true, { \"minimumAmount\": 0.005 } ")
|
||||
);
|
||||
|
||||
0
test/util/data/blanktxv1.json
Normal file → Executable file
0
test/util/data/blanktxv1.json
Normal file → Executable file
0
test/util/data/blanktxv2.json
Normal file → Executable file
0
test/util/data/blanktxv2.json
Normal file → Executable file
0
test/util/data/tt-delin1-out.json
Normal file → Executable file
0
test/util/data/tt-delin1-out.json
Normal file → Executable file
0
test/util/data/tt-delout1-out.json
Normal file → Executable file
0
test/util/data/tt-delout1-out.json
Normal file → Executable file
0
test/util/data/tt-locktime317000-out.json
Normal file → Executable file
0
test/util/data/tt-locktime317000-out.json
Normal file → Executable file
0
test/util/data/txcreate1.json
Normal file → Executable file
0
test/util/data/txcreate1.json
Normal file → Executable file
0
test/util/data/txcreate2.json
Normal file → Executable file
0
test/util/data/txcreate2.json
Normal file → Executable file
0
test/util/data/txcreatedata1.json
Normal file → Executable file
0
test/util/data/txcreatedata1.json
Normal file → Executable file
0
test/util/data/txcreatedata2.json
Normal file → Executable file
0
test/util/data/txcreatedata2.json
Normal file → Executable file
0
test/util/data/txcreatedata_seq0.json
Normal file → Executable file
0
test/util/data/txcreatedata_seq0.json
Normal file → Executable file
0
test/util/data/txcreatedata_seq1.json
Normal file → Executable file
0
test/util/data/txcreatedata_seq1.json
Normal file → Executable file
0
test/util/data/txcreatemultisig1.json
Normal file → Executable file
0
test/util/data/txcreatemultisig1.json
Normal file → Executable file
0
test/util/data/txcreatemultisig2.json
Normal file → Executable file
0
test/util/data/txcreatemultisig2.json
Normal file → Executable file
0
test/util/data/txcreatemultisig3.json
Normal file → Executable file
0
test/util/data/txcreatemultisig3.json
Normal file → Executable file
0
test/util/data/txcreatemultisig4.json
Normal file → Executable file
0
test/util/data/txcreatemultisig4.json
Normal file → Executable file
0
test/util/data/txcreateoutpubkey1.json
Normal file → Executable file
0
test/util/data/txcreateoutpubkey1.json
Normal file → Executable file
0
test/util/data/txcreateoutpubkey2.json
Normal file → Executable file
0
test/util/data/txcreateoutpubkey2.json
Normal file → Executable file
0
test/util/data/txcreateoutpubkey3.json
Normal file → Executable file
0
test/util/data/txcreateoutpubkey3.json
Normal file → Executable file
0
test/util/data/txcreatescript1.json
Normal file → Executable file
0
test/util/data/txcreatescript1.json
Normal file → Executable file
0
test/util/data/txcreatescript2.json
Normal file → Executable file
0
test/util/data/txcreatescript2.json
Normal file → Executable file
0
test/util/data/txcreatescript3.json
Normal file → Executable file
0
test/util/data/txcreatescript3.json
Normal file → Executable file
0
test/util/data/txcreatescript4.json
Normal file → Executable file
0
test/util/data/txcreatescript4.json
Normal file → Executable file
0
test/util/data/txcreatesignv1.json
Normal file → Executable file
0
test/util/data/txcreatesignv1.json
Normal file → Executable file
Loading…
Reference in New Issue
Block a user