Skip to content

Commit 2584abe

Browse files
committed
Update docstrings for RST paragraph flow
1 parent 68381f7 commit 2584abe

File tree

6 files changed

+25
-6
lines changed

6 files changed

+25
-6
lines changed

bitcoin/core/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ def CheckBlockHeader(block_header, fCheckPoW = True, cur_time=None):
663663
"""Context independent CBlockHeader checks.
664664
665665
fCheckPoW - Check proof-of-work.
666+
666667
cur_time - Current time. Defaults to time.time()
667668
668669
Raises CBlockHeaderError if block header is invalid.
@@ -699,7 +700,9 @@ def CheckBlock(block, fCheckPoW = True, fCheckMerkleRoot = True, cur_time=None):
699700
transaction.
700701
701702
fCheckPoW - Check proof-of-work.
703+
702704
fCheckMerkleRoot - Check merkle root matches transactions.
705+
703706
cur_time - Current time. Defaults to time.time()
704707
"""
705708

bitcoin/core/key.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ def set_compressed(self, compressed):
245245
def recover(self, sigR, sigS, msg, msglen, recid, check):
246246
"""
247247
Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields
248+
248249
recid selects which key is recovered
250+
249251
if check is non-zero, additional checks are performed
250252
"""
251253
i = int(recid / 2)
@@ -349,7 +351,9 @@ class CPubKey(bytes):
349351
Attributes:
350352
351353
is_valid - Corresponds to CPubKey.IsValid()
354+
352355
is_fullyvalid - Corresponds to CPubKey.IsFullyValid()
356+
353357
is_compressed - Corresponds to CPubKey.IsCompressed()
354358
"""
355359

bitcoin/core/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def to_p2sh_scriptPubKey(self, checksize=True):
741741
redeemScript to spend.
742742
743743
checksize - Check if the redeemScript is larger than the 520-byte max
744-
pushdata limit; raise ValueError if limit exceeded.
744+
pushdata limit; raise ValueError if limit exceeded.
745745
746746
Since a >520-byte PUSHDATA makes EvalScript() fail, it's not actually
747747
possible to redeem P2SH outputs with redeem scripts >520 bytes.

bitcoin/core/scripteval.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ def err_raiser(cls, *args):
361361
"""Helper function for raising EvalScriptError exceptions
362362
363363
cls - subclass you want to raise
364+
364365
*args - arguments
365366
366367
Fills in the state of execution for you.
@@ -680,9 +681,13 @@ def EvalScript(stack, scriptIn, txTo, inIdx, flags=()):
680681
"""Evaluate a script
681682
682683
stack - Initial stack
684+
683685
scriptIn - Script
686+
684687
txTo - Transaction the script is a part of
688+
685689
inIdx - txin index of the scriptSig
690+
686691
flags - SCRIPT_VERIFY_* flags to apply
687692
"""
688693

@@ -703,8 +708,11 @@ def VerifyScript(scriptSig, scriptPubKey, txTo, inIdx, flags=()):
703708
"""Verify a scriptSig satisfies a scriptPubKey
704709
705710
scriptSig - Signature
711+
706712
scriptPubKey - PubKey
713+
707714
txTo - Spending transaction
715+
708716
inIdx - Index of the transaction input containing scriptSig
709717
710718
Raises a ValidationError subclass if the validation fails.

bitcoin/rpc.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,10 @@ def getbalance(self, account='*', minconf=1):
295295
"""Get the balance
296296
297297
account - The selected account. Defaults to "*" for entire wallet. It
298-
may be the default account using "".
298+
may be the default account using "".
299+
299300
minconf - Only include transactions confirmed at least this many times.
300-
(default=1)
301+
(default=1)
301302
"""
302303
r = self._call('getbalance', account, minconf)
303304
return int(r*COIN)
@@ -387,8 +388,8 @@ def getrawtransaction(self, txid, verbose=False):
387388
388389
Raises IndexError if transaction not found.
389390
390-
verbose - If true a dict is returned instead with additional information
391-
on the transaction.
391+
verbose - If true a dict is returned instead with additional
392+
information on the transaction.
392393
393394
Note that if all txouts are spent and the transaction index is not
394395
enabled the transaction may not be available.
@@ -422,8 +423,9 @@ def getreceivedbyaddress(self, addr, minconf=1):
422423
always show zero.
423424
424425
addr - The address. (CBitcoinAddress instance)
426+
425427
minconf - Only include transactions confirmed at least this many times.
426-
(default=1)
428+
(default=1)
427429
"""
428430
r = self._call('getreceivedbyaddress', str(addr), minconf)
429431
return int(r * COIN)

bitcoin/wallet.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def from_scriptPubKey(cls, scriptPubKey, accept_non_canonical_pushdata=True, acc
153153
form.
154154
155155
accept_non_canonical_pushdata - Allow non-canonical pushes (default True)
156+
156157
accept_bare_checksig - Treat bare-checksig as P2PKH scriptPubKeys (default True)
157158
"""
158159
if accept_non_canonical_pushdata:
@@ -205,6 +206,7 @@ class CKey(object):
205206
Attributes:
206207
207208
pub - The corresponding CPubKey for this private key
209+
208210
is_compressed - True if compressed
209211
210212
"""

0 commit comments

Comments
 (0)