good morning!!!!

Skip to content
Snippets Groups Projects
Commit ad048e9f authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

update test

parent 0edcbc69
No related branches found
No related tags found
Loading
...@@ -2,10 +2,27 @@ package main ...@@ -2,10 +2,27 @@ package main
import ( import (
"fmt" "fmt"
"os"
"os/signal"
) )
const Debug = false const Debug = false
// Register interrupt handlers so we can stop the server
func RegisterInterupts(s *Server) {
// Buffered chan of one is enough
c := make(chan os.Signal, 1)
// Notify about interrupts for now
signal.Notify(c, os.Interrupt)
go func() {
for sig := range c {
fmt.Println("Shutting down (%v) ... \n", sig)
s.Stop()
}
}()
}
func main() { func main() {
InitFees() InitFees()
...@@ -30,17 +47,11 @@ func main() { ...@@ -30,17 +47,11 @@ func main() {
copyTx := &Transaction{} copyTx := &Transaction{}
copyTx.UnmarshalRlp(txData) copyTx.UnmarshalRlp(txData)
tx2 := NewTransaction("\x00", 20, []string{"SET 10 6", "LD 10 10"}) tx2 := NewTransaction("\x00", 20, []string{"SET 10 6", "LD 10 10"})
blck := NewBlock([]*Transaction{tx2, tx}) blck := CreateBlock([]*Transaction{tx2, tx})
bm.ProcessBlock( blck ) bm.ProcessBlock( blck )
t := blck.MarshalRlp() fmt.Println("GenesisBlock:", GenisisBlock, "hashed", GenisisBlock.Hash())
copyBlock := &Block{}
copyBlock.UnmarshalRlp(t)
fmt.Println(blck)
fmt.Println(copyBlock)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment