cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacks
This commit is contained in:
		| @@ -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... | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user