Cleanup comments & removed notes on escrow
This commit is contained in:
1 parent
84c0f56330
commit
f2a1c0368a
36 files changed
+648
-769
No files matched your search
+18
-18
@@ -5,28 +5,28 @@ import (
|
||||
"io"
|
||||
)
|
||||
|
||||
//Multiple Clearing Requests are possible by putting this inside an array of
|
||||
//clearing requests
|
||||
// Multiple Clearing Requests are possible by putting this inside an array of
|
||||
// clearing requests
|
||||
type CommitRevocation struct {
|
||||
//We can use a different data type for this if necessary...
|
||||
// We can use a different data type for this if necessary...
|
||||
ChannelID uint64
|
||||
|
||||
//Height of the commitment
|
||||
//You should have the most recent commitment height stored locally
|
||||
//This should be validated!
|
||||
//This is used for shachain.
|
||||
//Each party increments their own CommitmentHeight, they can differ for
|
||||
//each part of the Commitment.
|
||||
// Height of the commitment
|
||||
// You should have the most recent commitment height stored locally
|
||||
// This should be validated!
|
||||
// This is used for shachain.
|
||||
// Each party increments their own CommitmentHeight, they can differ for
|
||||
// each part of the Commitment.
|
||||
CommitmentHeight uint64
|
||||
|
||||
//Revocation to use
|
||||
// Revocation to use
|
||||
RevocationProof [20]byte
|
||||
}
|
||||
|
||||
func (c *CommitRevocation) Decode(r io.Reader, pver uint32) error {
|
||||
//ChannelID(8)
|
||||
//CommitmentHeight(8)
|
||||
//RevocationProof(20)
|
||||
// ChannelID(8)
|
||||
// CommitmentHeight(8)
|
||||
// RevocationProof(20)
|
||||
err := readElements(r,
|
||||
&c.ChannelID,
|
||||
&c.CommitmentHeight,
|
||||
@@ -39,13 +39,13 @@ func (c *CommitRevocation) Decode(r io.Reader, pver uint32) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//Creates a new CommitRevocation
|
||||
// Creates a new CommitRevocation
|
||||
func NewCommitRevocation() *CommitRevocation {
|
||||
return &CommitRevocation{}
|
||||
}
|
||||
|
||||
//Serializes the item from the CommitRevocation struct
|
||||
//Writes the data to w
|
||||
// Serializes the item from the CommitRevocation struct
|
||||
// Writes the data to w
|
||||
func (c *CommitRevocation) Encode(w io.Writer, pver uint32) error {
|
||||
err := writeElements(w,
|
||||
c.ChannelID,
|
||||
@@ -67,9 +67,9 @@ func (c *CommitRevocation) MaxPayloadLength(uint32) uint32 {
|
||||
return 36
|
||||
}
|
||||
|
||||
//Makes sure the struct data is valid (e.g. no negatives or invalid pkscripts)
|
||||
// Makes sure the struct data is valid (e.g. no negatives or invalid pkscripts)
|
||||
func (c *CommitRevocation) Validate() error {
|
||||
//We're good!
|
||||
// We're good!
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user