upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c77448d..15805ca 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1884,6 +1884,12 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
1884 if (pfrom->nVersion == 0) 1884 if (pfrom->nVersion == 0)
1885 return false; 1885 return false;
1886 1886
1887 // Optional: peers older than this field simply end the message here,
1888 // and nStartingHeight stays -1 for them. Never make this a requirement
1889 // -- every node released so far sends the short form.
1890 if (!vRecv.empty())
1891 vRecv >> pfrom->nStartingHeight;
1892
1887 pfrom->vSend.SetVersion(min(pfrom->nVersion, VERSION)); 1893 pfrom->vSend.SetVersion(min(pfrom->nVersion, VERSION));
1888 pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION)); 1894 pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
1889 1895
@@ -1912,7 +1918,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
1912 if (!vPexOut.empty()) 1918 if (!vPexOut.empty())
1913 pfrom->PushMessage("btfpeers", vPexOut); 1919 pfrom->PushMessage("btfpeers", vPexOut);
1914 1920
1915 if (LogAcceptsCategory("net")) printf("version addrMe = %s\n", addrMe.ToString().c_str()); 1921 if (LogAcceptsCategory("net")) printf("version addrMe = %s, peer height = %d\n", addrMe.ToString().c_str(), pfrom->nStartingHeight);
1916 } 1922 }
1917 1923
1918 1924