Skip to content

Commit

Permalink
ParisC hash
Browse files Browse the repository at this point in the history
  • Loading branch information
e-asphyx committed Jun 20, 2024
1 parent 5cb88fc commit c7c7272
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions protocol/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type BlockHeaderInfo interface {

func NewBlockInfo(proto *tz.ProtocolHash) (BlockInfo, error) {
switch *proto {
case core.Proto019PtParisB:
case core.Proto019PtParisB, core.Proto020PsParisC:
return new(proto_019_PtParisB.BlockInfo), nil
case core.Proto018Proxford:
return new(proto_018_Proxford.BlockInfo), nil
Expand All @@ -54,7 +54,7 @@ func NewBlockInfo(proto *tz.ProtocolHash) (BlockInfo, error) {

func NewBlockHeaderInfo(proto *tz.ProtocolHash) (BlockHeaderInfo, error) {
switch *proto {
case core.Proto019PtParisB:
case core.Proto019PtParisB, core.Proto020PsParisC:
return new(proto_019_PtParisB.BlockHeaderInfo), nil
case core.Proto018Proxford:
return new(proto_018_Proxford.BlockHeaderInfo), nil
Expand Down
2 changes: 1 addition & 1 deletion protocol/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

func NewConstants(proto *tz.ProtocolHash) (constants core.Constants, err error) {
switch *proto {
case core.Proto019PtParisB:
case core.Proto019PtParisB, core.Proto020PsParisC:
constants = new(proto_019_PtParisB.Constants)
case core.Proto018Proxford:
constants = new(proto_018_Proxford.Constants)
Expand Down
2 changes: 1 addition & 1 deletion protocol/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

func NewDelegateInfo(proto *tz.ProtocolHash) (delegate core.DelegateInfo, err error) {
switch *proto {
case core.Proto019PtParisB:
case core.Proto019PtParisB, core.Proto020PsParisC:
delegate = new(proto_019_PtParisB.DelegateInfo)
case core.Proto018Proxford:
delegate = new(proto_018_Proxford.DelegateInfo)
Expand Down
4 changes: 4 additions & 0 deletions protocol/core/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var (
Proto017PtNairob = tz.ProtocolHash{0xd9, 0xb8, 0xc2, 0x31, 0x4c, 0xc0, 0x5f, 0xfa, 0x3f, 0xc6, 0x55, 0xa9, 0x8b, 0xb8, 0x71, 0x55, 0xbe, 0x4c, 0xf7, 0xce, 0x67, 0xfe, 0xe6, 0xb5, 0x94, 0xea, 0x93, 0x02, 0xe8, 0x65, 0x5d, 0xf2}
Proto018Proxford = tz.ProtocolHash{0x0b, 0xf4, 0x4c, 0x7d, 0x64, 0xe3, 0xd7, 0xda, 0x27, 0xd9, 0x25, 0xd1, 0x0a, 0xf5, 0x35, 0xfb, 0x36, 0xce, 0xf0, 0xad, 0x41, 0x93, 0x0c, 0x79, 0x29, 0x77, 0x3f, 0x47, 0x31, 0xeb, 0xa1, 0x37}
Proto019PtParisB = tz.ProtocolHash{0xdb, 0xff, 0x65, 0x86, 0xa0, 0x48, 0x02, 0xd3, 0xf5, 0x13, 0xc6, 0x5a, 0x44, 0x4d, 0x9d, 0x4d, 0xeb, 0xe4, 0x2b, 0x17, 0xe9, 0xe7, 0x27, 0x3f, 0x8f, 0x6c, 0x11, 0x8e, 0xa3, 0xf4, 0xe0, 0x6e}
Proto020PsParisC = tz.ProtocolHash{0x58, 0x4d, 0x32, 0x39, 0x2e, 0xf2, 0x1a, 0x17, 0xef, 0x36, 0xdf, 0x07, 0x4f, 0x48, 0xaf, 0x06, 0x65, 0x3a, 0x8d, 0x31, 0x59, 0x57, 0xc9, 0x07, 0xd6, 0xa4, 0xc1, 0x8c, 0x3a, 0x00, 0xa5, 0xe1}
)

var Protocols = []*tz.ProtocolHash{
Expand All @@ -48,6 +49,7 @@ var Protocols = []*tz.ProtocolHash{
&Proto017PtNairob,
&Proto018Proxford,
&Proto019PtParisB,
&Proto020PsParisC,
}

var shortNames = map[tz.ProtocolHash]string{
Expand All @@ -71,6 +73,7 @@ var shortNames = map[tz.ProtocolHash]string{
Proto017PtNairob: "017_PtNairob",
Proto018Proxford: "018_Proxford",
Proto019PtParisB: "019_PtParisA",
Proto020PsParisC: "020_PsParisC",
}

var indices = map[tz.ProtocolHash]int{
Expand All @@ -94,6 +97,7 @@ var indices = map[tz.ProtocolHash]int{
Proto017PtNairob: 17,
Proto018Proxford: 18,
Proto019PtParisB: 19,
Proto020PsParisC: 20,
}

func ProtocolShortName(proto *tz.ProtocolHash) string {
Expand Down
2 changes: 1 addition & 1 deletion protocol/latest/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

var (
Protocol = core.Proto019PtParisB
Protocol = core.Proto020PsParisC
NewRunOperationRequest = latest.NewRunOperationRequest
NewUnsignedOperation = latest.NewUnsignedOperation
NewSignedOperation = latest.NewSignedOperation
Expand Down

0 comments on commit c7c7272

Please sign in to comment.