aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
authorobscuren <obscuren@obscura.com>2013-12-28 09:24:16 +0800
committerobscuren <obscuren@obscura.com>2013-12-28 09:24:16 +0800
commitbb8afba20a56552cef71681f72fb192bcda88c1d (patch)
tree4e309fadf96cc09f54e433c0af9dfe02e1932490 /ethereum.go
parent5a7eae705b83d75cb780279e386f183c4b6e19c6 (diff)
downloadgo-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.tar
go-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.tar.gz
go-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.tar.bz2
go-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.tar.lz
go-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.tar.xz
go-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.tar.zst
go-tangerine-bb8afba20a56552cef71681f72fb192bcda88c1d.zip
Updated tests
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/ethereum.go b/ethereum.go
index 78f08c15e..d3cecdc94 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -9,7 +9,7 @@ func main() {
bm := NewBlockManager()
- tx := NewTransaction(0x0, 20, []string{
+ tx := NewTransaction("\x00", 20, []string{
"SET 10 6",
"LD 10 10",
"LT 10 1 20",
@@ -23,13 +23,18 @@ func main() {
"SET 255 15",
"JMP 255",
})
- tx2 := NewTransaction(0x0, 20, []string{"SET 10 6", "LD 10 10"})
+ txData := tx.MarshalRlp()
+
+ copyTx := &Transaction{}
+ copyTx.UnmarshalRlp(txData)
+
+
+ tx2 := NewTransaction("\x00", 20, []string{"SET 10 6", "LD 10 10"})
blck := NewBlock([]*Transaction{tx2, tx})
bm.ProcessBlock( blck )
- //fmt.Printf("rlp encoded Tx %q\n", tx.MarshalRlp())
- fmt.Printf("block enc %q\n", blck.MarshalRlp())
- fmt.Printf("block hash %q\n", blck.Hash())
+ //t := blck.MarshalRlp()
+ //blck.UnmarshalRlp(t)
}