*/
async process (rpc: Rpc): Promise<string> {
Block.#validate(this)
- if (!this.signature) {
+ if (this.signature == null) {
throw new Error('Block is missing signature. Use sign() and try again.')
}
- if (!this.work == null) {
- throw new Error('Block is missing proof-of-work. Generate PoW and try again.')
+ if (this.work == null) {
+ throw new Error('Block is missing proof-of-work. Use pow() and try again.')
}
const data = {
"subtype": this.subtype,