zig-bitcoin / btczee

Bitcoin protocol implementation in Zig.
https://zig-bitcoin.github.io/btczee/
MIT License
48 stars 30 forks source link

Cmpctblock #144

Closed supreme2580 closed 1 month ago

supreme2580 commented 1 month ago

Closes: https://github.com/zig-bitcoin/btczee/issues/99

supreme2580 commented 1 month ago

@tdelabro I have implemented the changes, it seems the zig server is down is why the test is failing

supreme2580 commented 1 month ago

@TropicalDog17 Ohh thank you

supreme2580 commented 1 month ago

@TropicalDog17 I have done it

TropicalDog17 commented 1 month ago

@supreme2580 https://github.com/zig-bitcoin/btczee/pull/120/files#diff-b8b0098c7bce2d8503ab6153a6abb44b2b2a69386fa92eae842418abab0f320eR196

You should also have a unit test like this.

supreme2580 commented 1 month ago

Okay let me check it out

supreme2580 commented 1 month ago

@TropicalDog17 done it

supreme2580 commented 1 month ago

@tdelabro I have implemented your suggestions

tdelabro commented 1 month ago

@supreme2580 you forgot to use your eql method in tests

supreme2580 commented 1 month ago

@tdelabro isn't that try std.testing.expect(msg.eql(&deserialized)); ??

supreme2580 commented 1 month ago

@tdelabro I looked at the impl of getblocks it uses eql as try std.testing.expect(gb.eql(&deserialized_gb)); and I did the same, am I to do something different?