Blockpool better timeouts, download rate observation, quicker switching to consensus; Id -> ID (sorry, this doesn't belong here)

This commit is contained in:
Jae Kwon
2015-09-11 21:09:00 -07:00
parent 65ecf4b3a2
commit 625f23af13
24 changed files with 478 additions and 371 deletions
+2 -2
View File
@@ -40,11 +40,11 @@ func TestLog4(t *testing.T) {
if err != nil {
t.Errorf("Failed to start eventSwitch: %v", err)
}
eventId := types.EventStringLogEvent(account2.Address.Postfix(20))
eventID := types.EventStringLogEvent(account2.Address.Postfix(20))
doneChan := make(chan struct{}, 1)
eventSwitch.AddListenerForEvent("test", eventId, func(event types.EventData) {
eventSwitch.AddListenerForEvent("test", eventID, func(event types.EventData) {
logEvent := event.(types.EventDataLog)
// No need to test address as this event would not happen if it wasn't correct
if !reflect.DeepEqual(logEvent.Topics, expectedTopics) {
+3 -3
View File
@@ -692,15 +692,15 @@ func (vm *VM) call(caller, callee *Account, code, input []byte, value int64, gas
return nil, firstErr(err, ErrMemoryOutOfBounds)
}
if vm.evc != nil {
eventId := types.EventStringLogEvent(callee.Address.Postfix(20))
fmt.Printf("eventId: %s\n", eventId)
eventID := types.EventStringLogEvent(callee.Address.Postfix(20))
fmt.Printf("eventID: %s\n", eventID)
log := types.EventDataLog{
callee.Address,
topics,
data,
vm.params.BlockHeight,
}
vm.evc.FireEvent(eventId, log)
vm.evc.FireEvent(eventID, log)
}
dbg.Printf(" => T:%X D:%X\n", topics, data)