@@ -68,7 +68,7 @@ type testjethre struct {
6868
6969func (self * testjethre ) UnlockAccount (acc []byte ) bool {
7070 var ethereum * eth.Ethereum
71- self .stack .SingletonService (& ethereum )
71+ self .stack .Service (& ethereum )
7272
7373 err := ethereum .AccountManager ().Unlock (common .BytesToAddress (acc ), "" )
7474 if err != nil {
@@ -79,7 +79,7 @@ func (self *testjethre) UnlockAccount(acc []byte) bool {
7979
8080func (self * testjethre ) ConfirmTransaction (tx string ) bool {
8181 var ethereum * eth.Ethereum
82- self .stack .SingletonService (& ethereum )
82+ self .stack .Service (& ethereum )
8383
8484 if ethereum .NatSpec {
8585 self .lastConfirm = natspec .GetNotice (self .xeth , tx , self .client )
@@ -118,7 +118,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *nod
118118 if config != nil {
119119 config (ethConf )
120120 }
121- if err := stack .Register ("ethereum" , func (ctx * node.ServiceContext ) (node.Service , error ) { return eth .New (ctx , ethConf ) }); err != nil {
121+ if err := stack .Register (func (ctx * node.ServiceContext ) (node.Service , error ) { return eth .New (ctx , ethConf ) }); err != nil {
122122 t .Fatalf ("failed to register ethereum protocol: %v" , err )
123123 }
124124 // Initialize all the keys for testing
@@ -138,7 +138,7 @@ func testREPL(t *testing.T, config func(*eth.Config)) (string, *testjethre, *nod
138138 t .Fatalf ("failed to start test stack: %v" , err )
139139 }
140140 var ethereum * eth.Ethereum
141- stack .SingletonService (& ethereum )
141+ stack .Service (& ethereum )
142142
143143 assetPath := filepath .Join (os .Getenv ("GOPATH" ), "src" , "github.com" , "ethereum" , "go-ethereum" , "cmd" , "mist" , "assets" , "ext" )
144144 client := comms .NewInProcClient (codec .JSON )
@@ -202,7 +202,7 @@ func TestBlockChain(t *testing.T) {
202202 tmpfileq := strconv .Quote (tmpfile )
203203
204204 var ethereum * eth.Ethereum
205- node .SingletonService (& ethereum )
205+ node .Service (& ethereum )
206206 ethereum .BlockChain ().Reset ()
207207
208208 checkEvalJSON (t , repl , `admin.exportChain(` + tmpfileq + `)` , `true` )
@@ -436,7 +436,7 @@ multiply7 = Multiply7.at(contractaddress);
436436
437437func pendingTransactions (repl * testjethre , t * testing.T ) (txc int64 , err error ) {
438438 var ethereum * eth.Ethereum
439- repl .stack .SingletonService (& ethereum )
439+ repl .stack .Service (& ethereum )
440440
441441 txs := ethereum .TxPool ().GetTransactions ()
442442 return int64 (len (txs )), nil
@@ -464,7 +464,7 @@ func processTxs(repl *testjethre, t *testing.T, expTxc int) bool {
464464 return false
465465 }
466466 var ethereum * eth.Ethereum
467- repl .stack .SingletonService (& ethereum )
467+ repl .stack .Service (& ethereum )
468468
469469 err = ethereum .StartMining (runtime .NumCPU (), "" )
470470 if err != nil {
0 commit comments