automatically enable epoll and kqueue on supported systems
fix handling of services bitfield in version
fix handshaking to make sure it is fully completed for both incoming and outgoing connections
fix Tx#signature_hash_for_input for SIGHASH_SINGLE edge case

  https://bitcointalk.org/index.php?topic=260595.0

  "
    I also forked webbtc.com on mainnet today with transaction 315ac7d4c26d69668129cc352851d9389b4a6868f1509c6c8b66bead11e2619f It has two inputs, both using SIGHHASH_SINGLE, and only one output. SignatureHash() in script.cpp has the following code:

    if (nOut >= txTmp.vout.size())
    {
      printf("ERROR: SignatureHash() : nOut=%d out of range\n", nOut);
      return 1;
    }

    The thing is, that's not actually an error. SignatureHash() returns the hash of the signature, and CheckSig() doesn't check the return code, so it acts as though the hash the signature signed was 0000000000000000000000000000000000000000000000000000000000000001 You can create a signature for that, and it works just fine and the transaction is considered valid.
  "
fix handshake for outgoing connections