原始文献 / 论坛帖 / Re: auto backing up of wallet.dat

Re: auto backing up of wallet.dat

Bitcointalk · 2010-08-27 15:47:57 UTC

AuthorSatoshi Nakamoto
TitleRe: auto backing up of wallet.dat
Date2010-08-27 15:47:57 UTC
ForumBitcointalk · 原文

抱歉,我最近太忙了,消息只能粗看,还是跟不上。

我们要尽量避免 Windows API 调用。它们通常要 6-8 个参数,还要大量测试才能写对,做件简单的事得写一页代码。

我通常也回避 iostreams。感觉经常碰到它的局限。90 年代他们把 C++ 流标准搞砸了,挺可惜的,流做好了可以非常强大好用。在 rpc.cpp 里用它,没准还是个错误。

归根结底,我宁愿调用现成的文件复制函数,也不愿自己写一个再测试。

英文原文

Sorry, I've been so busy lately I've been skimming messages and I still can't keep up.

We want to avoid Windows API calls whenever possible.  They usually take about 6-8 parameters and a lot of testing to get right, it takes a page of code to do something simple.

I usually shy away from iostreams.  Seems like I too often hit limitations.  They kind of botched the C++ streams standard in the 90's, which is too bad, streams can be very powerful and useful when done right.  Using it in rpc.cpp may still turn out to be a mistake.

Bottom line is I'd rather call an existing file copy function than make and test my own.