channeldb+lnwire: rename MsgFundingLocked to MsgChannelReady

This commit is created by running,

```shell
gofmt -d -w -r 'MsgFundingLocked -> MsgChannelReady' .

gco master channeldb/migration
```
This commit is contained in:
yyforyongyu
2023-03-16 04:44:15 +08:00
parent 1b7c56b2ed
commit c8e8358918
4 changed files with 7 additions and 7 deletions

View File

@@ -111,5 +111,5 @@ func (c *ChannelReady) Encode(w *bytes.Buffer, pver uint32) error {
// //
// This is part of the lnwire.Message interface. // This is part of the lnwire.Message interface.
func (c *ChannelReady) MsgType() MessageType { func (c *ChannelReady) MsgType() MessageType {
return MsgFundingLocked return MsgChannelReady
} }

View File

@@ -289,7 +289,7 @@ func FuzzFundingCreated(f *testing.F) {
func FuzzFundingLocked(f *testing.F) { func FuzzFundingLocked(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgFundingLocked. // Prefix with MsgFundingLocked.
data = prefixWithMsgType(data, MsgFundingLocked) data = prefixWithMsgType(data, MsgChannelReady)
// Pass the message into our general fuzz harness for wire // Pass the message into our general fuzz harness for wire
// messages! // messages!

View File

@@ -566,7 +566,7 @@ func TestLightningWireProtocol(t *testing.T) {
v[0] = reflect.ValueOf(req) v[0] = reflect.ValueOf(req)
}, },
MsgFundingLocked: func(v []reflect.Value, r *rand.Rand) { MsgChannelReady: func(v []reflect.Value, r *rand.Rand) {
var c [32]byte var c [32]byte
if _, err := r.Read(c[:]); err != nil { if _, err := r.Read(c[:]); err != nil {
@@ -1013,7 +1013,7 @@ func TestLightningWireProtocol(t *testing.T) {
}, },
}, },
{ {
msgType: MsgFundingLocked, msgType: MsgChannelReady,
scenario: func(m ChannelReady) bool { scenario: func(m ChannelReady) bool {
return mainScenario(&m) return mainScenario(&m)
}, },

View File

@@ -31,7 +31,7 @@ const (
MsgAcceptChannel = 33 MsgAcceptChannel = 33
MsgFundingCreated = 34 MsgFundingCreated = 34
MsgFundingSigned = 35 MsgFundingSigned = 35
MsgFundingLocked = 36 MsgChannelReady = 36
MsgShutdown = 38 MsgShutdown = 38
MsgClosingSigned = 39 MsgClosingSigned = 39
MsgUpdateAddHTLC = 128 MsgUpdateAddHTLC = 128
@@ -88,7 +88,7 @@ func (t MessageType) String() string {
return "MsgFundingCreated" return "MsgFundingCreated"
case MsgFundingSigned: case MsgFundingSigned:
return "MsgFundingSigned" return "MsgFundingSigned"
case MsgFundingLocked: case MsgChannelReady:
return "FundingLocked" return "FundingLocked"
case MsgShutdown: case MsgShutdown:
return "Shutdown" return "Shutdown"
@@ -190,7 +190,7 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
msg = &FundingCreated{} msg = &FundingCreated{}
case MsgFundingSigned: case MsgFundingSigned:
msg = &FundingSigned{} msg = &FundingSigned{}
case MsgFundingLocked: case MsgChannelReady:
msg = &ChannelReady{} msg = &ChannelReady{}
case MsgShutdown: case MsgShutdown:
msg = &Shutdown{} msg = &Shutdown{}