aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-02-12 20:38:44 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-02-12 20:38:44 +0000
commit98500d70a8cf25af4bab80526fd128ccdc36ceeb (patch)
tree61624e0903150505dc09977ae9ff1bc9ab40ee2b /main.h
parentfa9dbd6b62ab161c29c9b8cf97b9c8da8ef4346e (diff)
downloadbitcoin-98500d70a8cf25af4bab80526fd128ccdc36ceeb.tar.xz
command line and JSON-RPC first draft, requires Boost 1.35 or higher for boost::asio,
added SetBitcoinAddress and GetBitcoinAddress methods on CScript, critsect interlocks around mapAddressBook, added some random delays in tx broadcast to improve privacy, now compiles with MSVC 8.0 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@60 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'main.h')
-rw-r--r--main.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.h b/main.h
index 14c445c70e..bcb6ec7dcc 100644
--- a/main.h
+++ b/main.h
@@ -36,6 +36,8 @@ extern CBlockIndex* pindexBest;
extern unsigned int nTransactionsUpdated;
extern map<uint256, int> mapRequestCount;
extern CCriticalSection cs_mapRequestCount;
+extern map<string, string> mapAddressBook;
+extern CCriticalSection cs_mapAddressBook;
// Settings
extern int fGenerateBitcoins;
@@ -58,7 +60,6 @@ vector<unsigned char> GenerateNewKey();
bool AddToWallet(const CWalletTx& wtxIn);
void WalletUpdateSpent(const COutPoint& prevout);
void ReacceptWalletTransactions();
-void RelayWalletTransactions();
bool LoadBlockIndex(bool fAllowNew=true);
void PrintBlockTree();
bool ProcessMessages(CNode* pfrom);
@@ -67,7 +68,8 @@ bool SendMessages(CNode* pto);
int64 GetBalance();
bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CKey& keyRet, int64& nFeeRequiredRet);
bool CommitTransactionSpent(const CWalletTx& wtxNew, const CKey& key);
-bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew);
+string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew);
+string SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWalletTx& wtxNew);
void GenerateBitcoins(bool fGenerate);
void ThreadBitcoinMiner(void* parg);
void BitcoinMiner();
@@ -680,7 +682,8 @@ public:
int SetMerkleBranch(const CBlock* pblock=NULL);
- int GetDepthInMainChain() const;
+ int GetDepthInMainChain(int& nHeightRet) const;
+ int GetDepthInMainChain() const { int nHeight; return GetDepthInMainChain(nHeight); }
bool IsInMainChain() const { return GetDepthInMainChain() > 0; }
int GetBlocksToMaturity() const;
bool AcceptTransaction(CTxDB& txdb, bool fCheckInputs=true);