Transcript for #bitcoin-dev 2018/03/27

00:59 ProfMac I have a string returned by bitcoin-cli getrawtransaction TxID. How can I turn this into a CDataStream.
01:52 kallewoof ProfMac: Use a transaction deserializer (I think it's defined in primitives/transaction.h)
01:52 kallewoof Oh wait, I misread your question.
09:21 dbackeus_ repost from yesterday, still need help: I'm learning the bitcoin procol by implementing it from scratch in Crystal. I have version handshake working as well as am able to `getdata` on incoming `inv` to get `tx` messages back, but somehow when I send "getblocks" or "getheaders" or "getaddr" the remote peer doesn't respond at all, any ideas for what might cause it or how to troubleshoot?
11:28 dbackeus_ I'm attempting to debug my client by running a local `bitcoind` process, however when running it in -regtest mode it doesn't appear to respond to the `version` message at all. Is that to be expected?
12:26 dbackeus_ figured it out, different magic bytes for regtest vs testnet
12:27 dbackeus_ so now I'm seeing my regtest node with 101 generated blocks DOES respond to "getblocks" while my testnet node still just ignores it...
14:36 kallewoof dbackeus: May wanna run with -debug=all -printtoconsole to see if it gives you any hints in the console when you connect
14:38 dbackeus kallewoof: is debug=all different from just -debug?
14:40 dbackeus I've been running with -debug and somewhere in the ocean of block-syncing output I can see it receives my "getblocks" message but it seems to just ignore it no warnings or errors
14:40 dbackeus only when running -regtest do I get block inv's back
15:15 ProfMac I'm tinkering with the source, trying to understand things. I have a string, such as that returned by getrawtransaction. This string is presumably a result of a call not unlike
15:15 ProfMac CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
15:15 ProfMac ssTx << tx;
15:15 ProfMac string strHex = HexStr(ssTx.begin(), ssTx.end());
15:16 ProfMac Now, I want to take the string, strHex, and turn it back into CTransaction tx2;
15:17 ProfMac I am missing the step of initializing the CDataStream from the string.