Bitcoin Forum
June 25, 2024, 07:35:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 [318] 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 »
6341  Other / Off-topic / Re: linux question on: June 09, 2012, 08:41:59 AM
Assuming that these scripts do actually accomplish what you are trying to do payment to 16grCc2rdtfRvnY2tKStaJDN3xgUHA4gjy would be much appreciated.


Cheers,

Ian.
6342  Other / Off-topic / Re: linux question on: June 09, 2012, 08:22:38 AM
Okay - no problem - this is an updated "copy_new_file" script:

Code:
if [ $# -lt 2 ]; then
 echo Usage: copy_new_files [destination directory] [hash value] [source file]
else
 if [ ! -d $1/hashes ]; then
  echo "Error: Did not find $1/hashes directory (create it and re-run if $1 is the correct destination)."
 else
  if [ ! -f $1/hashes/$2 ]; then
   echo $2 $3> $1/hashes/$2
   fname="${3%.[^.]*}"
   if [ -f $1/$fname ]; then
    cp $3 $1/$2.$fname
   else
    cp $3 $1
   fi
  fi
 fi
fi

Now if it finds a file with the same name already exists then the destination filename with have the md5 hash prefixed (e.g. y.txt becomes 2f8ff6fabf4b2936197b8a93702461f9.y.txt).
6343  Other / Off-topic / Re: linux question on: June 09, 2012, 07:57:59 AM
Okay - I've done this using two scripts. The first is called 'copy_files' and does the "find" and "md5sum" work:

Code:
if [ $# -lt 2 ]; then
 echo Usage: copy_files [source directory] [destination directory]
else
 if [ ! -d $2/hashes ]; then
  echo "Error: Did not find $2/hashes directory (create it and re-run if $2 is the correct destination)."
 else
  find $1 -name \* -type f  | xargs -n1 md5sum | xargs -n2 ./copy_new_file $2
 fi
fi

and the second is called "copy_new_file" which will copy the file to the destination unless a file with the same hash has already been copied before:

Code:
if [ $# -lt 3 ]; then
 echo Usage: copy_new_file [destination directory] [hash value] [source file]
else
 if [ ! -d $1/hashes ]; then
  echo "Error: Did not find $1/hashes directory (create it and re-run if $1 is the correct destination)."
 else
  if [ ! -d $1/hashes ]; then
   echo "Error: Did not find $1/hashes directory (create it and re-run if $1 is the correct destination)."
  else
   if [ ! -f $1/hashes/$2 ]; then
    echo $2 $3> $1/hashes/$2
    cp $3 $1
   fi
  fi
 fi
fi

To use first make sure you have execute permissions on both scripts:
Code:
chmod a+x copy_files copy_new_file

Now it is as simple as:
Code:
./copy_files source_dir dest_dir

This does have a problem that if you have two (or more) files that have the same name but have different hashes as the subsequent files will just overwrite the earlier ones. If this is going to be an issue for you then I'll work out a way to perhaps prefix the filename with the hash.
6344  Other / Off-topic / Re: linux question on: June 09, 2012, 07:12:06 AM
This could be fairly simply done just as a bash script (assuming you can run bash scripts on a Mac) and I'd be willing to write it for you for 2 BTC, however, there are a couple of things I would need to know first:

1) Are you happy for MD5 (or SHA1) to be the decision that the files are identical?

2) Can the destination files simply go to one directory or if not then how to determine which directory to copy them to?
6345  Other / Off-topic / Re: linux question on: June 09, 2012, 06:50:10 AM
I see - a little tricky but you might find the following useful for this job:

Code:
find . -name \* -type f  | xargs -n1 md5sum | sort >x

Change . to for example /mnt/raid (do this for each of your drives changing the name x to something different each time).

If you then check the contents of each 'x' file you should see something like the following:

Code:
cat x
0f4fa2bf42a91febbde52b7a32495f94  ./sub1/usage.bat
1bd3cb2ef387818ebe0fc318c232e27d  ./test.txt
2f8ff6fabf4b2936197b8a93702461f9  ./y.txt
8594592b8f830139b266c2d167a6fc5c  ./test.bun.gz
8c917a3450a4969d7e32e8da71e176ab  ./sub2/menu.bat
d41d8cd98f00b204e9800998ecf8427e  ./x
f258dcd6600d3ebf238662f8445b5e4a  ./sub1/sub1.1/hello.txt

If you check "diffs' between the various x files then you should be able to find any identical md5 hashes (which doesn't guarantee that the files are identical but it is most likely that they are).
6346  Other / Off-topic / Re: linux question on: June 09, 2012, 05:59:56 AM
Pretty much that simple - if your string has characters that are normally regexp ones then you'll need to escape those (or perhaps there is an option to indicate you are not using a regexp).

You may also need some other options if binary files need to be included (not sure but I don't think they are normally included).
6347  Other / Off-topic / Re: linux question on: June 09, 2012, 05:18:03 AM
grep -r "string" /mnt/raid/*
6348  Bitcoin / Bitcoin Technical Support / Re: Blockchain shows the transaction, blockexplorer not on: June 07, 2012, 06:59:16 AM
According to blockchain.info that tx is in block 183143, however, in blockexplorer.com the most recent block is listed as 182973.

Am guessing that blockexplorer.com hasn't been adding new blocks to its blockchain for a while.
6349  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 12:50:26 PM
Please don't recommend installing IIS for this, the pywallet page is generated by python with the help of twisted library so there is no need to have the microsoft IIS involved at all.

@Jeremy West, just follow the steps i posted earlier and you should be back in business in no time  Smiley

Oh - sorry my bad - I guess that the twisted library actually is the web server (doh! of course that's why 8989).

Forget the IIS web server installation then and after running pywallet.bat try http://localhost:8989 (you may have to allow an exception in your firewall for the web server to run on port 8989).
6350  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 12:40:02 PM
I know this is going to make me sound incredibly ignorant, but we'll start with the fact that I don't know what you mean when you say I need to have a local web server running. I just have normal DSL internet access. Is it still possible to do this?

Sure - when running a local web server you don't need internet access at all.

So - firstly you will need to make sure you have IIS installed (check this http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/).

EDIT - (see below)
6351  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 12:33:02 PM
I have tried to install this stuff and just hit a brick wall somewhere.

Although not exactly the easiest thing for a typical end-user to accomplish I actually found the instructions fairly straight forward.

If you could perhaps explain exactly how far you got with pywallet and what did/didn't happen at that point perhaps it shouldn't be too hard to get over the final hurdle.
6352  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 12:10:10 PM
and then run the following command:

Code:
python pywallet.py --web

Actually the current installation will create a pywallet.bat that you just need to run (it calls pywallet.py with the args provided for you).

Most importantly make sure you have a web server running locally in order to use http://localhost:8989.

EDIT - (see below)
6353  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 11:45:52 AM
I got the Windows version of pywallet installed and running (and yes you do need to click Next/I Agree many times).

Once you have "pywallet.bat" running then you can use http://localhost:8989/ as the interface (you need to have a web server running locally for this - if using Windows 7 then assuming IIS was installed then this is how to start it http://technet.microsoft.com/en-us/library/cc732317(v=ws.10).aspx).

Assuming you got the Pywallet Web Interface to appear then if you scroll down to Delete a key from your wallet you should be able to enter the txid of those 5 tx's to remove them one at a time (of course make sure you have a backup of the wallet before doing this).
6354  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 11:23:16 AM
My understanding was that the wallet contained nothing but the private keys. Is this incorrect?

Unfortunately it contains a lot more than just the private keys which I guess is exactly why the pywallet tool was created.
6355  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 10:42:45 AM
Damn it! Ended up with the same 5 unconfirmed transactions! Why would that be if they never ended up on the network?

I think the problem is that the tx's are known to your wallet so will just keep coming back.

Otherwise, you can set-up pywallet and delete the individual transactions from your wallet. It's easy to do this, luckily, but setup is a pain (lots of sitting and clicking until everything is installed).

Perhaps you will need to do this (and note that there is a Windows version of the tool).
6356  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 09:53:18 AM
I found the following in your debug.log:

Quote
Done loading
mapBlockIndex.size() = 183184
nBestHeight = 183183
setKeyPool.size() = 100
mapWallet.size() = 1777
mapAddressBook.size() = 1119
addUnchecked(): size 0
CTxMemPool::accept() : accepted ccf585bcfe
addUnchecked(): size 1
CTxMemPool::accept() : accepted ee188b9e04
addUnchecked(): size 2
CTxMemPool::accept() : accepted b1f331143f
addUnchecked(): size 3
CTxMemPool::accept() : accepted 11fd5b6aed
addUnchecked(): size 4
CTxMemPool::accept() : accepted 4b87953acc
Bound to port 8333
06/05/12 22:24 RandAddSeed() 212612 bytes
addrLocalHost = 58.106.25.78:8333

Not sure exactly what that tells us but those are the starting characters of your 5 tx's.

Also found this:

Quote
ResendWalletTransactions()
Relaying wtx ccf585bcfe
Relaying wtx ee188b9e04
Relaying wtx b1f331143f
Relaying wtx 11fd5b6aed
Relaying wtx 4b87953acc
received getdata for: tx ccf585bcfed1283d11b5
received getdata for: tx ee188b9e048d4889d7ad
received getdata for: tx b1f331143fbf75f0e8ce
received getdata for: tx 11fd5b6aed10e545136a
received getdata for: tx 4b87953accada36255e8
received getdata for: tx ccf585bcfed1283d11b5
received getdata for: tx ee188b9e048d4889d7ad
received getdata for: tx b1f331143fbf75f0e8ce
received getdata for: tx 11fd5b6aed10e545136a
received getdata for: tx 4b87953accada36255e8

The above actually appears a number of times (so I guess it kept trying to resend these tx's unsuccessfully).
6357  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 08:57:05 AM
If you do end up deciding you need to reload the blockchain you might also be interested in the following (at least for testing before you end up wasting too much time):

http://eu1.bitcoincharts.com/blockchain/

(these are snapshots of the blockchain taken daily)
6358  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 08:38:05 AM
Unfortunately these solutions didn't work. I'll be redownloading the blockchain scratch tonight, it seems.

Sorry to hear that - and from a bit of searching it seems that if the issue is actually within your wallet then even reloading the entire blockchain may not fix the problem.

I found the following that might be of help in this case:

https://bitcointalk.org/index.php?action=printpage%3btopic=11331.0
6359  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 05:47:10 AM
Hmmmm... WHen you say restart the bitcoin client do you mean starting the download of the blockchain from scratch or just closing the client and opening it again?

For the tx I had trouble with all I did was exit the program and then restarted it (I think it still took a while for the tx to be re-sent from memory).

Have you tried running it with a --rescan ?

Indeed you should certainly do this before resorting to downloading the whole block chain again.
6360  Bitcoin / Bitcoin Technical Support / Re: HELP! Transactions not confirming ;( - 4 btc bounty on: June 06, 2012, 05:39:10 AM
I did have (just the one) tx that didn't send due to not having internet connectivity and am pretty sure I had to actually restart the Bitcoin client to get it to re-send (although maybe I was just impatient).
Pages: « 1 ... 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 [318] 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!