forked from ChainSafe/chainbridge-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Reverting generics and minor fixes (#20)
Co-authored-by: mj52951 <[email protected]>
- Loading branch information
Showing
10 changed files
with
44 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
package message | ||
|
||
type MessageType string | ||
type Message[T any] struct { | ||
type Message struct { | ||
Source uint8 // Source where message was initiated | ||
Destination uint8 // Destination chain of message | ||
Data T // Data associated with the message | ||
Data interface{} // Data associated with the message | ||
Type MessageType // Message type | ||
} | ||
|
||
func NewMessage[T any]( | ||
source uint8, | ||
destination uint8, | ||
data T, | ||
msgType MessageType, | ||
) *Message[T] { | ||
return &Message[T]{ | ||
source, | ||
destination, | ||
data, | ||
msgType, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
package proposal | ||
|
||
type ProposalType string | ||
type Proposal[T any] struct { | ||
type Proposal struct { | ||
Source uint8 | ||
Destination uint8 | ||
Data T | ||
Data interface{} | ||
Type ProposalType | ||
} | ||
|
||
func NewProposal[T any](source, destination uint8, data T, propType ProposalType) *Proposal[T] { | ||
return &Proposal[T]{ | ||
Source: source, | ||
Destination: destination, | ||
Data: data, | ||
Type: propType, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters