> strAccount; uint64 nNumber; ssKey >>"> > strAccount; uint64 nNumber; ssKey >>"> > strAccount; uint64 nNumber; ssKey >>">
Bitcointalk · Incompatible wallet format with latest bitcoin-git ?

中本聪,2010 年 11 月 30 日

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

阅读语言
中文译文

这个钱包之前是配合什么用的?早期的账户补丁还是 git 构建?

出错是在加载钱包时。我想一定是在这段里:

else if (strType == "acentry")
    {
        string strAccount;
        ssKey >> strAccount;
        uint64 nNumber;
        ssKey >> nNumber;
        if (nNumber > nAccountingEntryNumber)
            nAccountingEntryNumber = nNumber;
    }

你能够用这个检查:

else if (strType == "acentry")
    {
        string strAccount;
        assert(!ssKey.empty());
        ssKey >> strAccount;
        uint64 nNumber;
        if (ssKey.size() != 8 )
            printf("***** %s %d
", strAccount.c_str(), ssKey.size());
        assert(ssKey.empty() == false);
        ssKey >> nNumber;
        if (nNumber > nAccountingEntryNumber)
            nAccountingEntryNumber = nNumber;
    }

git 上某个时期是否有过一个账户功能的过渡版本,其键仅有 ("acentry", "account")?

倘若你有 gdb,能够在 gdb 里运行它并做一次回溯。

gdb --args bitcoin ... run (等待异常出现) bt

ORIGINAL · 英文原文
What was this wallet used with?  An early accounts patch or git build?

It's while loading the wallet.  I assume it must be in this:

    else if (strType == "acentry")
    {
        string strAccount;
        ssKey >> strAccount;
        uint64 nNumber;
        ssKey >> nNumber;
        if (nNumber > nAccountingEntryNumber)
            nAccountingEntryNumber = nNumber;
    }

You could check that with this:

    else if (strType == "acentry")
    {
        string strAccount;
        assert(!ssKey.empty());
        ssKey >> strAccount;
        uint64 nNumber;
        if (ssKey.size() != 8 )
            printf("***** %s %d ", strAccount.c_str(), ssKey.size());
        assert(ssKey.empty() == false);
        ssKey >> nNumber;
        if (nNumber > nAccountingEntryNumber)
            nAccountingEntryNumber = nNumber;
    }


Was there an interim version of accounts on git at some point that had just ("acentry", "account") for the key?

If you have gdb, you could run it in gdb and do a backtrace.

gdb --args bitcoin ...
run
(wait for exception)
bt
上下文
← 上一条 SN-3747 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-3747