From 54ac6bddb9e5b4dff566ba7a7d47cdd7e5a73a38 Mon Sep 17 00:00:00 2001 From: wakgill <76528604+wakgill@users.noreply.github.com> Date: Thu, 7 Jan 2021 22:57:29 -0600 Subject: [PATCH] Create 98.md --- docs/forum/bitcoin-forum/98.md | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/forum/bitcoin-forum/98.md diff --git a/docs/forum/bitcoin-forum/98.md b/docs/forum/bitcoin-forum/98.md new file mode 100644 index 0000000..798824e --- /dev/null +++ b/docs/forum/bitcoin-forum/98.md @@ -0,0 +1,41 @@ +--- +layout: forum +title: 'Re: removing bitcoin addresses' +grand_parent: Forum Posts +parent: Bitcoin Forum +nav_order: 98 +date: 2010-05-16 23:34:40 UTC +original: https://bitcointalk.org/index.php?topic=101.msg1134#msg1134 +--- + +# Re: removing bitcoin addresses + +--- + +``` +Re: removing bitcoin addresses +May 16, 2010, 11:34:40 PM + +SheriffWoody: +Bitcoin addresses you generate are kept forever. A bitcoin address must be kept to show ownership of anything sent to it. If you were able to delete a bitcoin address and someone sent to it, the money would be lost. They're only about 500 bytes. + +sirius-m: +Thousands of own addresses should not be any problem at all. If you've generated 50000 BTC, then you already have 1000 own addresses, one for each 50 generated. Those are hidden, they're not shown in the UI. + +It would be a good idea to add a little code that keeps giving the same address to the same IP. Here's what I did in C++ to keep giving the same key (aka bitcoin address) until they use it: + + // Keep giving the same key to the same ip until they use it + if (!mapReuseKey.count(pfrom->addr.ip)) + mapReuseKey[pfrom->addr.ip] = GenerateNewKey(); + + ...sends the key mapReuseKey[pfrom->addr.ip] + +...later... + + // Received something with this key + mapReuseKey.erase(pfrom->addr.ip); + +If it's not convenient to know when you've received, just clear the cached keys every 20 minutes. + +I want to add a parameter to getnewaddress for number of days to expire if nothing is received with the address. +```