hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.49k stars 815 forks source link

Fix name of parameter for WithdrawalRequest #7122

Closed lucassaldanha closed 4 months ago

lucassaldanha commented 4 months ago

PR description

The name of the parameter should be validatorPublicKey. This change https://github.com/hyperledger/besu/pull/7121/commits/7e78da631a24a55f990a58dfdcb7f63ca95b0267 tried to fix it but only made the change in the @JsonProperty in the constructor, that is used for deserialization.

To fix this, we need to fix it on the getter method with the @JsonGetter annotation. This is what is used for serialization and infers the name of the field from the name of the getter method. So getValidatorPublicKey becomes validatorPublicKey when serializing to json.

I have also removed the method asJsonObject because it is not being used.

lucassaldanha commented 4 months ago

PS: this needs to be backported to a pectra branch.