Skip to content

Use consistent capitalization for (Script)PubKey#524

Merged
tcharding merged 1 commit intorust-bitcoin:masterfrom
jamillambert:0226-scriptpubkey-capitalization
Feb 27, 2026
Merged

Use consistent capitalization for (Script)PubKey#524
tcharding merged 1 commit intorust-bitcoin:masterfrom
jamillambert:0226-scriptpubkey-capitalization

Conversation

@jamillambert
Copy link
Collaborator

The capitalization of key in pubkey and scriptpubkey is inconsistent. Core uses a capital K in e.g. scriptPubKey in gettxout, and a capital K is more common in rust-bitcoin.

Search the whole codebase for "Pubkey" and change them all to "PubKey". No changes made where the p is lowercase.

Closes #371

The capitalization of key in pubkey and scriptpubkey is inconsistent.
Core uses a capital K in e.g. scriptPubKey in gettxout.

Search the whole codebase for "Pubkey" and change them all to
"PubKey". No changes made where the p is lowercase.
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK abd9f78

Pubkey,
/// Pubkey hash output script.
PubkeyHash,
/// PubKey output script.
Copy link
Member

@tcharding tcharding Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised the linter doesnt' complain about this? If it starts doing so I'm inclined to think we should just use 'pubkey' and 'Pubkey' (capitalized) in docs and not add an attribute to shoosh the linter.

@tcharding
Copy link
Member

Weird, the merge script just started erroring even though I only just merged #519 with it.

emote: Resolving deltas: 100% (57/57), completed with 40 local objects.
remote: error: GH013: Repository rule violations found for refs/heads/master.
remote: Review all repository rules at https://github.com/rust-bitcoin/corepc/rules?ref=refs%2Fheads%2Fmaster
remote: 
remote: - Changes must be made through a pull request.
remote: 
To github.com:rust-bitcoin/corepc
 ! [remote rejected]   master -> master (push declined due to repository rule violations)
error: failed to push some refs to 'github.com:rust-bitcoin/corepc'
Traceback (most recent call last):
  File "/home/tobin/bin/github-merge", line 495, in <module>
    main()
  File "/home/tobin/bin/github-merge", line 487, in main
    subprocess.check_call([GIT,'push',host_repo,'refs/heads/'+branch])
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'push', 'git@github.com:rust-bitcoin/corepc', 'refs/heads/master']' returned non-zero exit status 1.

Going to click the button and leave in case GitHub is just gliching out right now.

@tcharding tcharding merged commit 9f2be16 into rust-bitcoin:master Feb 27, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the same capitalisation as rust-bitcoin in identifiers that include 'pubkey'

2 participants