You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
515 B
28 lines
515 B
6 years ago
|
package identitychain
|
||
|
|
||
|
import (
|
||
|
"sync"
|
||
|
|
||
|
"github.com/simple-rules/harmony-benchmark/waitnode"
|
||
|
)
|
||
|
|
||
|
var mutex sync.Mutex
|
||
|
|
||
|
// IdentityChain (Blockchain) keeps Identities per epoch, currently centralized!
|
||
|
type IdentityChain struct {
|
||
|
Identities []*IdentityBlock
|
||
|
PendingIdentities []*waitnode.WaitNode
|
||
|
}
|
||
|
|
||
|
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()
|
||
|
|
||
|
}()
|
||
|
}
|