Skip to content

Commit

Permalink
#1994 add maxFeePerGas patch
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Jan 8, 2025
1 parent 2b52c21 commit 2c1029d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libethereum/SchainPatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ SchainPatchEnum getEnumForPatchName( const std::string& _patchName ) {
return SchainPatchEnum::FlexibleDeploymentPatch;
else if ( _patchName == "ExternalGasPatch" )
return SchainPatchEnum::ExternalGasPatch;
else if ( _patchName == "MaxFeePerGasPatch" )
return SchainPatchEnum::MaxFeePerGasPatch;
else
throw std::out_of_range( _patchName );
}
Expand Down Expand Up @@ -76,6 +78,8 @@ std::string getPatchNameForEnum( SchainPatchEnum _enumValue ) {
return "FlexibleDeploymentPatch";
case SchainPatchEnum::ExternalGasPatch:
return "ExternalGasPatch";
case SchainPatchEnum::MaxFeePerGasPatch:
return "MaxFeePerGasPatch";
default:
throw std::out_of_range(
"UnknownPatch #" + std::to_string( static_cast< size_t >( _enumValue ) ) );
Expand Down
6 changes: 6 additions & 0 deletions libethereum/SchainPatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,10 @@ DEFINE_SIMPLE_PATCH( FlexibleDeploymentPatch );
*/
DEFINE_SIMPLE_PATCH( ExternalGasPatch );

/*
* Context: fix the check in transaction constructor
* maxFeePerGas cannot be less than maxPriorityFeePerGas
*/
DEFINE_SIMPLE_PATCH( MaxFeePerGasPatch );

#endif // SCHAINPATCH_H
1 change: 1 addition & 0 deletions libethereum/SchainPatchEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ enum class SchainPatchEnum {
VerifyBlsSyncPatch,
FlexibleDeploymentPatch,
ExternalGasPatch,
MaxFeePerGasPatch,
PatchesCount
};

Expand Down

0 comments on commit 2c1029d

Please sign in to comment.