-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug when calling REST method with extension bin
#43
Conversation
4deab74
to
cb7161f
Compare
9ce9a14
to
c2fc2f6
Compare
test/index_test.js
Outdated
|
||
hex.should.endWith('cf900000000\n'); | ||
}); | ||
it('should match a transaction binary-encoded with hex-encoded', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the same description as the test implementation is not really important in this case.
test/index_test.js
Outdated
@@ -434,13 +434,26 @@ describe('Client', () => { | |||
block.should.have.keys('bits', 'chainwork', 'confirmations', 'difficulty', 'hash', 'height', 'mediantime', 'merkleroot', 'nextblockhash', 'nonce', 'size', 'strippedsize', 'time', 'tx', 'version', 'versionHex', 'weight'); | |||
block.tx.should.matchEach(value => value.should.be.a.String()); | |||
}); | |||
|
|||
it('should match a transaction binary-encoded with hex-encoded', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or keep the original test description:
should return a block binary-encoded if extension is `bin`
c2fc2f6
to
492c82f
Compare
492c82f
to
b360dfc
Compare
b360dfc
to
fdd41f8
Compare
This PR fixes a bug when calling REST methods with
extension: bin
which were retrieving invalid data on response buffer.