Acc/X/Receive -> Acc/X/Call

This commit is contained in:
Jae Kwon
2015-07-23 23:57:28 -07:00
parent 6b1a846201
commit feeab6579b
5 changed files with 31 additions and 31 deletions

View File

@ -151,14 +151,14 @@ func TestSendCall(t *testing.T) {
}
}
// subscribes to an AccReceive, runs the vm, returns the exception
// subscribes to an AccCall, runs the vm, returns the exception
func runVMWaitEvents(t *testing.T, ourVm *VM, caller, callee *Account, subscribeAddr, contractCode []byte, gas int64) string {
// we need to catch the event from the CALL to check for exceptions
evsw := events.NewEventSwitch()
evsw.Start()
ch := make(chan interface{})
fmt.Printf("subscribe to %x\n", subscribeAddr)
evsw.AddListenerForEvent("test", types.EventStringAccReceive(subscribeAddr), func(msg interface{}) {
evsw.AddListenerForEvent("test", types.EventStringAccCall(subscribeAddr), func(msg interface{}) {
ch <- msg
})
evc := events.NewEventCache(evsw)