mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-12 01:10:36 +00:00
53c014a0bb
Avoid serializing payload again and again for various purposes. To sign it, we only need a hash. Some 2.4% gain in TPS could be achieved with this.
16 lines
392 B
Go
16 lines
392 B
Go
package crypto
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/util"
|
|
|
|
// Verifiable represents an object which can be verified.
|
|
type Verifiable interface {
|
|
GetSignedPart() []byte
|
|
GetSignedHash() util.Uint256
|
|
}
|
|
|
|
// VerifiableDecodable represents an object which can be both verified and
|
|
// decoded from given data.
|
|
type VerifiableDecodable interface {
|
|
Verifiable
|
|
DecodeSignedPart([]byte) error
|
|
}
|