diff options
| -rw-r--r-- | README.md | 19 | ||||
| -rw-r--r-- | init.cpp | 14 | ||||
| -rw-r--r-- | irc.cpp | 4 | ||||
| -rw-r--r-- | net.cpp | 8 | ||||
| -rw-r--r-- | ui.cpp | 9 | ||||
| -rw-r--r-- | util.cpp | 2 | ||||
| -rw-r--r-- | util.h | 1 |
7 files changed, 34 insertions, 23 deletions
@@ -1,12 +1,13 @@ -Gavin's Bitcoin patches -======================= +Bitcoin integration/staging tree -Branches here: +Straw-man plan for Bitcoin development (open source vets, please slap me around and help make this better): -* svn : up-to-date mirror of the 'production' Bitcoin (from http://sourceforge.net/projects/bitcoin/). -* monitorreceived : Implements monitortransaction/monitorblocks/gettransaction/getblock RPC commands. -* listtransactions: Implements new JSON-RPC command "listtransactions" (from jgarzik) -* refundtransaction : Implements new JSON-RPC command "refundtransaction" -* master : All of the above, merged together. +Developers work in their own trees, then submit pull requests when they think their feature is ready. + +Requests get discussed (where? bitcoin forums?) and if there's broad consensus they're a good thing, well written, match coding style, etc. then they're merged into the 'master' branch. + +master branch is regularly built and tested (by who? need people willing to be quality assurance testers), and periodically pushed to the subversion repo to become the official, stable, released bitcoin. + + +We'll create feature branches if/when there are major new features being worked on by several people. -Code is hosted at github: http://github.com/gavinandresen/bitcoin-git @@ -181,7 +181,8 @@ bool AppInit2(int argc, char* argv[]) " -rpcpassword=<pw>\t " + _("Password for JSON-RPC connections\n") + " -rpcport=<port> \t\t " + _("Listen for JSON-RPC connections on <port>\n") + " -rpcallowip=<ip> \t\t " + _("Allow JSON-RPC connections from specified IP address\n") + - " -rpcconnect=<ip> \t " + _("Send commands to node running on <ip>\n"); + " -rpcconnect=<ip> \t " + _("Send commands to node running on <ip>\n") + + " -nolisten \t " + _("Don't accept connections from outside"); #ifdef USE_SSL strUsage += string() + @@ -211,6 +212,8 @@ bool AppInit2(int argc, char* argv[]) fPrintToDebugger = GetBoolArg("-printtodebugger"); fTestNet = GetBoolArg("-testnet"); + + fNoListen = GetBoolArg("-nolisten"); if (fCommandLine) { @@ -290,10 +293,13 @@ bool AppInit2(int argc, char* argv[]) // Bind to the port early so we can tell if another instance is already running. string strErrors; - if (!BindListenPort(strErrors)) + if (!fNoListen) { - wxMessageBox(strErrors, "Bitcoin"); - return false; + if (!BindListenPort(strErrors)) + { + wxMessageBox(strErrors, "Bitcoin"); + return false; + } } // @@ -257,8 +257,10 @@ void ThreadIRCSeed(void* parg) void ThreadIRCSeed2(void* parg) { - if (mapArgs.count("-connect")) + /* Dont advertise on IRC if we don't allow incoming connections */ + if (mapArgs.count("-connect") || fNoListen) return; + if (GetBoolArg("-noirc")) return; printf("ThreadIRCSeed started\n"); @@ -643,7 +643,9 @@ void ThreadSocketHandler2(void* parg) FD_ZERO(&fdsetSend); FD_ZERO(&fdsetError); SOCKET hSocketMax = 0; - FD_SET(hListenSocket, &fdsetRecv); + + if(hListenSocket != INVALID_SOCKET) + FD_SET(hListenSocket, &fdsetRecv); hSocketMax = max(hSocketMax, hListenSocket); CRITICAL_BLOCK(cs_vNodes) { @@ -680,7 +682,7 @@ void ThreadSocketHandler2(void* parg) // // Accept new connections // - if (FD_ISSET(hListenSocket, &fdsetRecv)) + if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv)) { struct sockaddr_in sockaddr; socklen_t len = sizeof(sockaddr); @@ -1344,7 +1346,7 @@ void StartNode(void* parg) #endif printf("addrLocalHost = %s\n", addrLocalHost.ToString().c_str()); - if (fUseProxy || mapArgs.count("-connect")) + if (fUseProxy || mapArgs.count("-connect") || fNoListen) { // Proxies can't take incoming connections addrLocalHost.ip = CAddress("0.0.0.0").ip; @@ -1466,8 +1466,7 @@ CTxDetailsDialog::CTxDetailsDialog(wxWindow* parent, CWalletTx wtx) : CTxDetails void CTxDetailsDialog::OnButtonOK(wxCommandEvent& event) { - Close(); - //Destroy(); + EndModal(false); } @@ -1736,12 +1735,12 @@ void COptionsDialog::OnKillFocusProxy(wxFocusEvent& event) void COptionsDialog::OnButtonOK(wxCommandEvent& event) { OnButtonApply(event); - Close(); + EndModal(false); } void COptionsDialog::OnButtonCancel(wxCommandEvent& event) { - Close(); + EndModal(false); } void COptionsDialog::OnButtonApply(wxCommandEvent& event) @@ -1828,7 +1827,7 @@ CAboutDialog::CAboutDialog(wxWindow* parent) : CAboutDialogBase(parent) void CAboutDialog::OnButtonOK(wxCommandEvent& event) { - Close(); + EndModal(false); } @@ -17,7 +17,7 @@ bool fDaemon = false; bool fCommandLine = false; string strMiscWarning; bool fTestNet = false; - +bool fNoListen = false; @@ -146,6 +146,7 @@ extern bool fDaemon; extern bool fCommandLine; extern string strMiscWarning; extern bool fTestNet; +extern bool fNoListen; void RandAddSeed(); void RandAddSeedPerfmon(); |