Two utilities methods added needed by getdifficulty JSON/RPC command