BlockState.sample_graph(): Fix problem with unweighted graphs

6 jobs for master in 206 minutes and 56 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Test
passed #3525
amd64
job_clang_amd64

03:26:56

passed #3529
amd64
job_clang_amd64_nosh

02:56:33

passed #3527
amd64
job_clang_py2_amd64

03:20:36

passed #3524
amd64
job_gcc_amd64

02:48:19

passed #3528
amd64
job_gcc_amd64_nosh

02:08:01

passed #3526
amd64
job_gcc_py2_amd64

02:39:00