updated for bitcoin 0.9.0