func NewInMemoryDB() *InMemoryDB {
	return &InMemoryDB{
		DB:            make(map[chainhash.Hash]primitives.Block),
		AttestationDB: make(map[uint32]primitives.Attestation),
		blockNodes:    make(map[chainhash.Hash]BlockNodeDisk),
		statemap:      make(map[chainhash.Hash]primitives.State),
		lock:          new(sync.Mutex),
	}
}
NewInMemoryDB initializes a new in-memory DB
package db
import (
	"errors"
	"fmt"
	"sync"
	"github.com/libp2p/go-libp2p-core/crypto"
	"github.com/prysmaticlabs/go-ssz"
	"github.com/phoreproject/synapse/chainhash"
	"github.com/phoreproject/synapse/primitives"
)
type InMemoryDB struct {
	DB             map[chainhash.Hash]primitives.Block
	AttestationDB  map[uint32]primitives.Attestation
	head           chainhash.Hash
	justified      chainhash.Hash
	blockNodes     map[chainhash.Hash]BlockNodeDisk
	statemap       map[chainhash.Hash]primitives.State
	genesisTime    uint64
	hostkey        []byte
	finalized      chainhash.Hash
	finalizedState primitives.State
	justifiedState primitives.State
	lock           *sync.Mutex
}