func (p *PartialShardStateAccess) Get(key chainhash.Hash) (*chainhash.Hash, error) {
	if len(p.verificationWitnesses) == 0 {
		return nil, fmt.Errorf("no witnesses left")
	}

	vw := p.verificationWitnesses[0]

	if vw.Key != key {
		return nil, fmt.Errorf("incorrect witness; expected key: %s, got key: %s", vw.Key, key)
	}

	pass := csmt.CheckWitness(&vw, p.stateRoot)
	if !pass {
		return nil, fmt.Errorf("witness did not validate for key: %s", key)
	}

	p.verificationWitnesses = p.verificationWitnesses[1:]

	return &vw.Value, nil
}
// Get gets a key from the partial state.
Get gets a key from the partial state.
// Get gets a key from the partial state .
func (p *PartialShardStateAccess) Get(key chainhash.Hash) (*chainhash.Hash, error) {
	if len(p.verificationWitnesses) == 0 {
		return nil, fmt.Errorf("no witnesses left")
	}
	vw := p.verificationWitnesses[0]
	if vw.Key != key {
		return nil, fmt.Errorf("incorrect witness; expected key: %s, got key: %s", vw.Key, key)
	}
	pass := csmt.CheckWitness(&vw, p.stateRoot)
	if !pass {
		return nil, fmt.Errorf("witness did not validate for key: %s", key)
	}
	p.verificationWitnesses = p.verificationWitnesses[1:]
	return &vw.Value, nil
}
func ( p * PartialShardStateAccess ) Get ( key chainhash . Hash ) ( * chainhash . Hash , error ) { if len ( p . verificationWitnesses ) == 0 { return nil , fmt . Errorf ( " " ) } vw := p . verificationWitnesses [ 0 ] if vw . Key != key { return nil , fmt . Errorf ( " " , vw . Key , key ) } pass := csmt . CheckWitness ( & vw , p . stateRoot ) if ! pass { return nil , fmt . Errorf ( " " , key ) } p . verificationWitnesses = p . verificationWitnesses [ 1 : ] return & vw . Value , nil }
Get gets a key from the partial state.
Get gets a key from the partial state .