From c597d7c411b87d0baa1c2a09c7224729d8799846 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 26 Jul 2016 01:19:57 -0700 Subject: [PATCH] bip151: overflow sequence number properly. --- lib/bcoin/bip151.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bcoin/bip151.js b/lib/bcoin/bip151.js index 4054c7b5..40348ba4 100644 --- a/lib/bcoin/bip151.js +++ b/lib/bcoin/bip151.js @@ -109,7 +109,7 @@ BIP151Stream.prototype.sequence = function sequence() { this.seq++; // Wrap sequence number a la openssh. - if (this.seq === 0xffffffff) + if (this.seq === 0x100000000) this.seq = 0; // State of the ciphers is