Page MenuHomePhabricator

Accept cash magic in addition to regular magic.
ClosedPublic

Authored by deadalnix on Jul 31 2017, 14:01.

Details

Summary

This will allow us to transition toward using a new magic once enough of the network supports it.

Test Plan

Updated the regression test mininode implementation to use the new magic.

../qa/pull-tester/rpc-tests.py -extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Your src/test/net_tests.cpp changes should not have been in this commit. Actual content is looks fine. I didn't actually test this, though.

src/net_processing.cpp
1585 ↗(On Diff #991)

its Ok to pass in std::string into LogPrintf, no need for that c_str()

Might we want to add that fUsesCashMagic business to CNodeStats so that RPC JSON can see which peers are using cash magic and which aren't (as part of getpeerinfo RPC call)?

Or is that not useful?

Also -- might we not want to modify deserialization functions that use the MessageStart() to deserialize data eg in addrdb.cpp (CBanDB::Read is an example) to *also* accept CashMessageStart() in addition to MessageStart() as a header when reading -- in case we want to one day totally get rid of the old magic?

This revision is now accepted and ready to land.Aug 3 2017, 20:25
This revision was automatically updated to reflect the committed changes.