Minor fixes and sample coin "improvements"

This commit is contained in:
obscuren
2014-04-24 00:01:22 +02:00
parent 43f1214f97
commit bb72347acf
8 changed files with 112 additions and 27 deletions

View File

@ -8,7 +8,7 @@ import (
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethdb"
"github.com/ethereum/eth-go/ethutil"
"github.com/niemeyer/qml"
"github.com/go-qml/qml"
"math/big"
"strings"
)
@ -24,6 +24,18 @@ type Tx struct {
Contract bool
}
type Key struct {
Address string
}
type KeyRing struct {
Keys []interface{}
}
func NewKeyRing(keys []interface{}) *KeyRing {
return &KeyRing{Keys: keys}
}
func NewTxFromTransaction(tx *ethchain.Transaction) *Tx {
hash := hex.EncodeToString(tx.Hash())
sender := hex.EncodeToString(tx.Recipient)