Skip to content

Commit 18c883b

Browse files
committed
add comment on an argument of getblock rpc
1 parent 73110cb commit 18c883b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bitcoin/rpc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ def getblock(self, block_hash):
449449
raise TypeError('%s.getblock(): block_hash must be bytes; got %r instance' %
450450
(self.__class__.__name__, block_hash.__class__))
451451
try:
452+
# With this change ( https://github.com/bitcoin/bitcoin/commit/96c850c20913b191cff9f66fedbb68812b1a41ea#diff-a0c8f511d90e83aa9b5857e819ced344 ),
453+
# bitcoin core's rpc takes 0/1/2 instead of true/false as the 2nd argument which specifies verbosity, since v0.15.0.
454+
# The change above is backward-compatible so far; the old "false" is taken as the new "0".
452455
r = self._call('getblock', block_hash, False)
453456
except InvalidAddressOrKeyError as ex:
454457
raise IndexError('%s.getblock(): %s (%d)' %

0 commit comments

Comments
 (0)