aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-08-12 20:52:38 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-08-16 11:20:56 -0400
commitc7286112efe5c9ee7924aa387c8f4280473a72a8 (patch)
tree077b487b477db977ab8f389dabbf45494b95e907
parentb2fd0ca1cb3c65dca72d26b04c69d9e2383a4b5e (diff)
downloadbitcoin-c7286112efe5c9ee7924aa387c8f4280473a72a8.tar.xz
Remove unused ScanMessageStart function
-rw-r--r--src/main.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ee9165095a..f483312065 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1385,47 +1385,6 @@ bool static ProcessBlock(CNode* pfrom, CBlock* pblock)
-template<typename Stream>
-bool static ScanMessageStart(Stream& s)
-{
- // Scan ahead to the next pchMessageStart, which should normally be immediately
- // at the file pointer. Leaves file pointer at end of pchMessageStart.
- s.clear(0);
- short prevmask = s.exceptions(0);
- const char* p = BEGIN(pchMessageStart);
- try
- {
- loop
- {
- char c;
- s.read(&c, 1);
- if (s.fail())
- {
- s.clear(0);
- s.exceptions(prevmask);
- return false;
- }
- if (*p != c)
- p = BEGIN(pchMessageStart);
- if (*p == c)
- {
- if (++p == END(pchMessageStart))
- {
- s.clear(0);
- s.exceptions(prevmask);
- return true;
- }
- }
- }
- }
- catch (...)
- {
- s.clear(0);
- s.exceptions(prevmask);
- return false;
- }
-}
-
bool CheckDiskSpace(uint64 nAdditionalBytes)
{
uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available;