building identity chain

pull/61/head
Alok Kothari 6 years ago
parent d6e43ebd53
commit c7eb46444a
  1. 25
      identitychain/identitychain.go

@ -7,6 +7,7 @@ import (
"sync"
"github.com/simple-rules/harmony-benchmark/log"
"github.com/simple-rules/harmony-benchmark/p2p"
"github.com/simple-rules/harmony-benchmark/waitnode"
)
@ -19,18 +20,6 @@ type IdentityChain struct {
log log.Logger
}
func main() {
var IDC IdentityChain
go func() {
genesisBlock := &IdentityBlock{0, "127.0.0.1", "8080", 0}
mutex.Lock()
IDC.Identities = append(IDC.Identities, genesisBlock)
mutex.Unlock()
}()
}
//IdentityChainHandler handles transactions
func (IDC *IdentityChain) IdentityChainHandler(conn net.Conn) {
fmt.Println("yay")
@ -51,3 +40,15 @@ func (IDC *IdentityChain) listenOnPort(port string) {
go IDC.IdentityChainHandler(conn)
}
}
func main() {
var IDC IdentityChain
var nullPeer p2p.Peer
go func() {
genesisBlock := &IdentityBlock{nullPeer, 0}
mutex.Lock()
IDC.Identities = append(IDC.Identities, genesisBlock)
mutex.Unlock()
}()
}

Loading…
Cancel
Save