Skip to content

回复:最新的 bitcoin-git 使用了不兼容的钱包格式? ​

原始发布页

打开来源页面
查看 1 个交叉存档

这个钱包曾经和什么一起使用?早期的账户补丁,还是 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
(wait for exception)
bt

英文原文 ​

展开英文原文

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

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。