Skip to content

Commit 059d39f

Browse files
committed
[WalletModel] isCoinStake method added.
1 parent 4d5ff36 commit 059d39f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/qt/walletmodel.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,13 @@ const CWalletTx* WalletModel::getTx(uint256 id){
446446
return wallet->GetWalletTx(id);
447447
}
448448

449+
bool WalletModel::isCoinStake(QString id){
450+
uint256 hashTx;
451+
hashTx.SetHex(id.toStdString());
452+
const CWalletTx* tx = getTx(hashTx);
453+
return tx->IsCoinStake();
454+
}
455+
449456
bool WalletModel::mintCoins(CAmount value, CCoinControl* coinControl ,std::string &strError){
450457
CWalletTx wtx;
451458
vector<CDeterministicMint> vMints;

src/qt/walletmodel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ class WalletModel : public QObject
165165
};
166166

167167
const CWalletTx* getTx(uint256 id);
168+
bool isCoinStake(QString id);
168169

169170
// prepare transaction for getting txfee before sending coins
170171
SendCoinsReturn prepareTransaction(WalletModelTransaction& transaction, const CCoinControl* coinControl = NULL);

0 commit comments

Comments
 (0)