Partially refactored server/txpool/block manager/block chain

The Ethereum structure now complies to a EthManager interface which is
being used by the tx pool, block manager and block chain in order to
gain access to each other. It's become simpeler.
TODO: BlockManager => StateManager
This commit is contained in:
obscuren
2014-03-05 10:42:51 +01:00
parent 5b1613d65b
commit 92f2abdf76
8 changed files with 204 additions and 82 deletions

View File

@ -50,3 +50,16 @@ func TestValueTypes(t *testing.T) {
t.Errorf("expected BigInt to return '%v', got %v", bigExp, bigInt.BigInt())
}
}
func TestIterator(t *testing.T) {
value := NewValue([]interface{}{1, 2, 3})
it := value.NewIterator()
values := []uint64{1, 2, 3}
i := 0
for it.Next() {
if values[i] != it.Value().Uint() {
t.Errorf("Expected %d, got %d", values[i], it.Value().Uint())
}
i++
}
}