TimestampServices expose a simple list of timestamps. We want the advanced ones to be able to easily use common code to handle the Acceptor metadata and block divisions, regardless of which blockchain or blockchain-like concrete system we are using.
The interface should include the following:
type Block map[string]int
type BlockMiddleware struct {
// ...
}
func (bm BlockMiddleware) GetTimestamps(blocks []Block) []string {
// ...
}
BlockMiddleware can then be used directly (and internally) by blockchain backends.
TimestampServices expose a simple list of timestamps. We want the advanced ones to be able to easily use common code to handle the Acceptor metadata and block divisions, regardless of which blockchain or blockchain-like concrete system we are using.
The interface should include the following:
BlockMiddleware can then be used directly (and internally) by blockchain backends.