Bitcointalk · Exception: 9key_error error

中本聪,2010 年 5 月 16 日

SN-0538 已核对来源,附原文与上下文。

阅读语言
中文译文

是每次运行都发生,还是在某个随机时刻只发生过一次?

我以前从没见过它失败。那是一次对 OpenSSL 的调用,我以为它永远不会失败,但我还是在那里放了个错误检查以防万一。我想不出它会怎么失败。也许是内存耗尽。

代码是:

key.h: EC_KEY* pkey;

pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
        if (pkey == NULL)
            throw key_error("CKey::CKey() : EC_KEY_new_by_curve_name failed");

NID_secp256k1 是个常量。

ORIGINAL · 英文原文
Does it happen every time you run it, or just happened once at some random time?

I've never seen that fail before.  It's a call to OpenSSL that I assumed would never fail, but I put an error check there just in case.  I can't imagine how it would fail.  Out of memory maybe.

The code is:

key.h:
    EC_KEY* pkey;

        pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
        if (pkey == NULL)
            throw key_error("CKey::CKey() : EC_KEY_new_by_curve_name failed");

NID_secp256k1 is a constant.
上下文
← 上一条 SN-0538 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0538