aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md19
-rw-r--r--init.cpp14
-rw-r--r--irc.cpp4
-rw-r--r--net.cpp8
-rw-r--r--ui.cpp9
-rw-r--r--util.cpp2
-rw-r--r--util.h1
7 files changed, 34 insertions, 23 deletions
diff --git a/README.md b/README.md
index 4c8475c88..f13a79a98 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/init.cpp b/init.cpp
index 61ca4d2bd..cfb5d8e33 100644
--- a/init.cpp
+++ b/init.cpp
@@ -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;
+ }
}
//
diff --git a/irc.cpp b/irc.cpp
index aad9beb76..5adaf1165 100644
--- a/irc.cpp
+++ b/irc.cpp
@@ -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");
diff --git a/net.cpp b/net.cpp
index da7661962..a626acd37 100644
--- a/net.cpp
+++ b/net.cpp
@@ -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;
diff --git a/ui.cpp b/ui.cpp
index 1cb922fad..17ad63083 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -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);
}
diff --git a/util.cpp b/util.cpp
index 42256a9d0..694f91304 100644
--- a/util.cpp
+++ b/util.cpp
@@ -17,7 +17,7 @@ bool fDaemon = false;
bool fCommandLine = false;
string strMiscWarning;
bool fTestNet = false;
-
+bool fNoListen = false;
diff --git a/util.h b/util.h
index f57e40106..c69bf1ce1 100644
--- a/util.h
+++ b/util.h
@@ -146,6 +146,7 @@ extern bool fDaemon;
extern bool fCommandLine;
extern string strMiscWarning;
extern bool fTestNet;
+extern bool fNoListen;
void RandAddSeed();
void RandAddSeedPerfmon();