cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacks

This commit is contained in:
Péter Szilágyi
2015-11-17 18:33:25 +02:00
parent 8a44451edf
commit 1e806c4c77
30 changed files with 1051 additions and 949 deletions

View File

@@ -35,8 +35,8 @@ import (
type SampleService struct{}
func (s *SampleService) Protocols() []p2p.Protocol { return nil }
func (s *SampleService) Start() error { fmt.Println("Sample service starting..."); return nil }
func (s *SampleService) Stop() error { fmt.Println("Sample service stopping..."); return nil }
func (s *SampleService) Start(*p2p.Server) error { fmt.Println("Service starting..."); return nil }
func (s *SampleService) Stop() error { fmt.Println("Service stopping..."); return nil }
func ExampleUsage() {
// Create a network node to run protocols with the default values. The below list
@@ -80,8 +80,8 @@ func ExampleUsage() {
log.Fatalf("Failed to stop the protocol stack: %v", err)
}
// Output:
// Sample service starting...
// Sample service stopping...
// Sample service starting...
// Sample service stopping...
// Service starting...
// Service stopping...
// Service starting...
// Service stopping...
}