Errors & warnings for inappropriate RPCs (#6029)
* Clarify function name Function checks if sealing is currently underway, not to be confused with checking whether the engine performs internal sealing. * Error when work called on internal sealing engine * Error submitting work for internal sealing engine * Fix inverted bool and style grumbles * Add can_produce_work_package to TestMinerService * Error when setting engine signer on PoW chain * Unit tests for engine signing Setting engine signer should fail if chain does not seal internally or client lacks account provider. * Tweak TestMinerService * Fix minor style grumbles
This commit is contained in:
@@ -21,6 +21,7 @@ export const ERROR_CODES = {
|
||||
NO_WORK: -32001,
|
||||
NO_AUTHOR: -32002,
|
||||
NO_NEW_WORK: -32003,
|
||||
NO_WORK_REQUIRED: -32004,
|
||||
NOT_ENOUGH_DATA: -32006,
|
||||
UNKNOWN_ERROR: -32009,
|
||||
TRANSACTION_ERROR: -32010,
|
||||
@@ -38,7 +39,7 @@ export const ERROR_CODES = {
|
||||
COMPILATION_ERROR: -32050,
|
||||
ENCRYPTION_ERROR: -32055,
|
||||
FETCH_ERROR: -32060,
|
||||
INVALID_PARAMS: -32602
|
||||
INVALID_PARAMS: -32602,
|
||||
};
|
||||
|
||||
export default class TransportError extends ExtendableError {
|
||||
|
||||
Reference in New Issue
Block a user