Coin Control Features
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
8dfd8c62dc
commit
6a86c24db1
@@ -11,11 +11,19 @@
|
||||
#include "allocators.h" /* for SecureString */
|
||||
|
||||
#include <QObject>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
class AddressTableModel;
|
||||
class OptionsModel;
|
||||
class TransactionTableModel;
|
||||
class WalletModelTransaction;
|
||||
class CKeyID;
|
||||
class CPubKey;
|
||||
class COutput;
|
||||
class COutPoint;
|
||||
class uint256;
|
||||
class CCoinControl;
|
||||
|
||||
class CWallet;
|
||||
|
||||
@@ -80,7 +88,7 @@ public:
|
||||
AddressTableModel *getAddressTableModel();
|
||||
TransactionTableModel *getTransactionTableModel();
|
||||
|
||||
qint64 getBalance() const;
|
||||
qint64 getBalance(const CCoinControl *coinControl=NULL) const;
|
||||
qint64 getUnconfirmedBalance() const;
|
||||
qint64 getImmatureBalance() const;
|
||||
int getNumTransactions() const;
|
||||
@@ -92,13 +100,13 @@ public:
|
||||
// Return status record for SendCoins, contains error id + information
|
||||
struct SendCoinsReturn
|
||||
{
|
||||
SendCoinsReturn(StatusCode status):
|
||||
SendCoinsReturn(StatusCode status=Aborted):
|
||||
status(status) {}
|
||||
StatusCode status;
|
||||
};
|
||||
|
||||
// prepare transaction for getting txfee before sending coins
|
||||
SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction);
|
||||
SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction, const CCoinControl *coinControl=NULL);
|
||||
|
||||
// Send coins to a list of recipients
|
||||
SendCoinsReturn sendCoins(WalletModelTransaction &transaction);
|
||||
@@ -133,6 +141,15 @@ public:
|
||||
|
||||
UnlockContext requestUnlock();
|
||||
|
||||
bool getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const;
|
||||
void getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs);
|
||||
void listCoins(std::map<QString, std::vector<COutput> >& mapCoins) const;
|
||||
|
||||
bool isLockedCoin(uint256 hash, unsigned int n) const;
|
||||
void lockCoin(COutPoint& output);
|
||||
void unlockCoin(COutPoint& output);
|
||||
void listLockedCoins(std::vector<COutPoint>& vOutpts);
|
||||
|
||||
private:
|
||||
CWallet *wallet;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user