Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Sep 30, 2024
1 parent 3f2fd50 commit 220d93f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
12 changes: 2 additions & 10 deletions p2p/modes.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ func (s SyncMode) MarshalText() ([]byte, error) {
}
}

func (mode *SyncMode) UnmarshalText(text []byte) error {
switch string(text) {
case "full":
*mode = FullSync
case "snap":
*mode = SnapSync
default:
return fmt.Errorf(`unknown sync mode %q, want "full" or "snap"`, text)
}
return nil
func (s *SyncMode) UnmarshalText(text []byte) error {
return s.Set(string(text))
}
3 changes: 1 addition & 2 deletions p2p/snap_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import (
"sync/atomic"
"time"

"github.com/NethermindEth/juno/p2p/starknet"

"github.com/NethermindEth/juno/adapters/core2p2p"
"github.com/NethermindEth/juno/adapters/p2p2core"
"github.com/NethermindEth/juno/blockchain"
"github.com/NethermindEth/juno/core"
"github.com/NethermindEth/juno/core/crypto"
"github.com/NethermindEth/juno/core/felt"
"github.com/NethermindEth/juno/core/trie"
"github.com/NethermindEth/juno/p2p/starknet"
"github.com/NethermindEth/juno/p2p/starknet/spec"
"github.com/NethermindEth/juno/service"
"github.com/NethermindEth/juno/starknetdata"
Expand Down

0 comments on commit 220d93f

Please sign in to comment.